Documentation
¶
Overview ¶
Package postgres implements the standard Python-schema-compatible PostgreSQL saver.
Index ¶
- func MigrationStatements() []string
- type Codec
- type Saver
- func (saver *Saver) Close() error
- func (saver *Saver) CopyThread(ctx context.Context, sourceThreadID, targetThreadID string) error
- func (saver *Saver) DeleteThread(ctx context.Context, threadID string) error
- func (saver *Saver) GetDeltaChannelHistory(ctx context.Context, config dacheckpoint.Config, channels []string) (map[string]dacheckpoint.DeltaHistory, error)
- func (saver *Saver) GetTuple(ctx context.Context, config dacheckpoint.Config) (*dacheckpoint.Tuple, error)
- func (saver *Saver) List(ctx context.Context, config *dacheckpoint.Config, ...) ([]dacheckpoint.Tuple, error)
- func (saver *Saver) NextVersion(current string) (string, error)
- func (saver *Saver) Prune(ctx context.Context, threadIDs []string, strategy dacheckpoint.PruneStrategy) error
- func (saver *Saver) Put(ctx context.Context, config dacheckpoint.Config, value dacheckpoint.Checkpoint, ...) (dacheckpoint.Config, error)
- func (saver *Saver) PutWrites(ctx context.Context, config dacheckpoint.Config, taskID string, ...) error
- func (saver *Saver) Setup(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MigrationStatements ¶
func MigrationStatements() []string
MigrationStatements returns a defensive copy for schema conformance tests.
Types ¶
type Saver ¶
type Saver struct {
// contains filtered or unexported fields
}
Saver owns or wraps a database/sql PostgreSQL pool.
func NewWithCodec ¶
NewWithCodec wraps an existing database/sql PostgreSQL handle with payloadCodec.
func (*Saver) CopyThread ¶
func (*Saver) DeleteThread ¶
func (*Saver) GetDeltaChannelHistory ¶
func (saver *Saver) GetDeltaChannelHistory(ctx context.Context, config dacheckpoint.Config, channels []string) (map[string]dacheckpoint.DeltaHistory, error)
func (*Saver) GetTuple ¶
func (saver *Saver) GetTuple(ctx context.Context, config dacheckpoint.Config) (*dacheckpoint.Tuple, error)
func (*Saver) List ¶
func (saver *Saver) List(ctx context.Context, config *dacheckpoint.Config, options dacheckpoint.ListOptions) ([]dacheckpoint.Tuple, error)
func (*Saver) Prune ¶
func (saver *Saver) Prune(ctx context.Context, threadIDs []string, strategy dacheckpoint.PruneStrategy) error
func (*Saver) Put ¶
func (saver *Saver) Put( ctx context.Context, config dacheckpoint.Config, value dacheckpoint.Checkpoint, metadata dacheckpoint.Metadata, newVersions map[string]string, ) (dacheckpoint.Config, error)
func (*Saver) PutWrites ¶
func (saver *Saver) PutWrites( ctx context.Context, config dacheckpoint.Config, taskID string, taskPath string, writes []dacheckpoint.ChannelWrite, ) error
Click to show internal directories.
Click to hide internal directories.