Interface SnapshotDialect

All Known Implementing Classes:
AbstractJdbcDialect, H2Dialect, MysqlDialect, PostgresDialect, SqliteDialect

public interface SnapshotDialect
Table-domain dialect interface for the snapshots table.

Stores binary workspace tar archives keyed by snapshot_id.

Method names are prefixed with snapshot to avoid collision when the aggregate class implements multiple table-domain interfaces.

Author:
shanhongyu
  • Method Details

    • snapshotTableName

      default String snapshotTableName()
      Base table name (without prefix).
    • snapshotCreateTableDdls

      List<String> snapshotCreateTableDdls()
      DDL statements (one or more) to create the snapshots table. Must be idempotent.
    • snapshotUpsert

      BoundSql snapshotUpsert(String snapshotId, InputStream data)
      Idempotent UPSERT for uploading a snapshot.

      The data param is bound as a binary stream via PreparedStatement.setBinaryStream(int, InputStream) by the client, so snapshots of arbitrary size are streamed straight to the database without loading the whole archive into heap memory.

    • snapshotSelect

      default BoundSql snapshotSelect(String snapshotId)
      Single-snapshot SELECT. Projection: data.
    • snapshotExists

      default BoundSql snapshotExists(String snapshotId)
      Snapshot existence probe.