Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB interface { // Table collection 操作 Table(collection string) types.Table // NextSequence 获取新序列号(非事务) NextSequence(ctx context.Context, sequenceName string) (uint64, error) // Ping 健康检查 Ping() error // 健康检查 // HasTable 判断是否存在集合 HasTable(ctx context.Context, name string) (bool, error) // DropTable 移除集合 DropTable(ctx context.Context, name string) error // CreateTable 创建集合 CreateTable(ctx context.Context, name string) error IsDuplicatedError(error) bool IsNotFoundError(error) bool Close() error // CommitTransaction 提交事务 CommitTransaction(context.Context, *metadata.TxnCapable) error // AbortTransaction 取消事务 AbortTransaction(context.Context, *metadata.TxnCapable) error // InitTxnManager TxnID management of initial transaction InitTxnManager(r *redis.Client) error }
DB db operation interface
Click to show internal directories.
Click to hide internal directories.