Documentation ¶
Index ¶
- func New(primary rel.Adapter, replicas ...rel.Adapter) rel.Adapter
- type PrimaryReplica
- func (pr *PrimaryReplica) Aggregate(ctx context.Context, query rel.Query, mode string, field string) (int, error)
- func (pr *PrimaryReplica) Apply(ctx context.Context, migration rel.Migration) error
- func (pr *PrimaryReplica) Begin(ctx context.Context) (rel.Adapter, error)
- func (pr *PrimaryReplica) Close() error
- func (pr *PrimaryReplica) Commit(ctx context.Context) error
- func (pr *PrimaryReplica) Delete(ctx context.Context, query rel.Query) (int, error)
- func (pr *PrimaryReplica) Exec(ctx context.Context, stmt string, args []interface{}) (int64, int64, error)
- func (pr *PrimaryReplica) Insert(ctx context.Context, query rel.Query, primaryField string, ...) (interface{}, error)
- func (pr *PrimaryReplica) InsertAll(ctx context.Context, query rel.Query, primaryField string, fields []string, ...) ([]interface{}, error)
- func (pr *PrimaryReplica) Instrumentation(instrumenter rel.Instrumenter)
- func (pr *PrimaryReplica) Ping(ctx context.Context) error
- func (pr *PrimaryReplica) Query(ctx context.Context, query rel.Query) (rel.Cursor, error)
- func (pr *PrimaryReplica) Rollback(ctx context.Context) error
- func (pr *PrimaryReplica) Update(ctx context.Context, query rel.Query, primaryField string, ...) (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type PrimaryReplica ¶
type PrimaryReplica struct {
// contains filtered or unexported fields
}
func (*PrimaryReplica) Close ¶
func (pr *PrimaryReplica) Close() error
func (*PrimaryReplica) Instrumentation ¶
func (pr *PrimaryReplica) Instrumentation(instrumenter rel.Instrumenter)
Click to show internal directories.
Click to hide internal directories.