Documentation ¶
Index ¶
- type Builder
- func (b *Builder) Delete(table string, conds ...string) string
- func (b *Builder) GetColumnNames(v interface{}) []string
- func (b *Builder) InsertStruct(table string, v interface{}) string
- func (b *Builder) Select(table string, columns []string, conditions ...string) string
- func (b *Builder) String() string
- func (b *Builder) Update(table string, sets []string, conditions ...string) string
- func (b *Builder) WriteRune(r rune)
- func (b *Builder) WriteString(s string)
- type DB
- func (d *DB) CreateNamespace(ctx context.Context, x *sqlx.Tx, ns *Namespace) error
- func (d *DB) CreateObject(ctx context.Context, x *sqlx.Tx, obj *types.Object)
- func (d *DB) DeleteAllObjectLabels(ctx context.Context, x *sqlx.Tx, nsID types.NSID, objID types.ObjID) error
- func (d *DB) DeleteNamespace(ctx context.Context, x *sqlx.Tx, ns *Namespace) error
- func (d *DB) DeleteObjectLabels(ctx context.Context, x *sqlx.Tx, nsID types.NSID, objID types.ObjID, ...) error
- func (d *DB) FindObjectsMatchingSelector(ctx context.Context, nsID types.NSID, tm *types.TypeMeta, ...) ([]types.ObjID, error)
- func (d *DB) GetNamespaceByID(ctx context.Context, id types.NSID) (*Namespace, error)
- func (d *DB) GetNamespaceByKey(ctx context.Context, key string) (*Namespace, error)
- func (d *DB) ListNamespace(ctx context.Context, parent *Namespace, page *types.Page) ([]*Namespace, error)
- func (d *DB) ListObjectLabels(ctx context.Context, nsID types.NSID, objID types.ObjID) ([]types.Label, error)
- func (d *DB) Migrate() error
- func (d *DB) UpdateNamespace(ctx context.Context, ns *Namespace) error
- func (d *DB) UpdateObjectLabels(ctx context.Context, x *sqlx.Tx, meta *types.ObjectMeta) error
- func (d *DB) X(ctx context.Context, fn func(tx *sqlx.Tx) error, opts ...*sql.TxOptions) error
- type Label
- type Namespace
- type Options
- type StmtFunc
- type UUID
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
func (*Builder) GetColumnNames ¶
func (*Builder) InsertStruct ¶
func (*Builder) WriteString ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
DB for db
func (*DB) CreateNamespace ¶
func (*DB) CreateObject ¶
func (*DB) DeleteAllObjectLabels ¶
func (d *DB) DeleteAllObjectLabels(ctx context.Context, x *sqlx.Tx, nsID types.NSID, objID types.ObjID) error
Delete all labels of objects
func (*DB) DeleteNamespace ¶
func (*DB) DeleteObjectLabels ¶
func (*DB) FindObjectsMatchingSelector ¶
func (*DB) GetNamespaceByID ¶
func (*DB) GetNamespaceByKey ¶
func (*DB) ListNamespace ¶
func (*DB) ListObjectLabels ¶
func (*DB) UpdateObjectLabels ¶
type Options ¶
type Options struct { Driver string URI string ConnMaxLifetime time.Duration MaxOpenConns int MaxIdleConns int }
Options for db
Click to show internal directories.
Click to hide internal directories.