Versions in this module Expand all Collapse all v1 v1.0.0 Jul 17, 2018 Changes in this version + type DB struct + func NewDB(options options.Options) *DB + func (db *DB) Begin() (transaction.Transaction, error) + func (db *DB) BeginTx(_ context.Context, _ *transaction.TxOptions) (transaction.Transaction, error) + func (db *DB) Close() + func (db *DB) Connect(format, conn string, maxOpenConn int) error + func (db *DB) DropTable(s *schema.Schema) error + func (db *DB) Options() options.Options + func (db *DB) RegisterTable(s *schema.Schema, cascade, migrate bool) error + type Transaction struct + func (tx *Transaction) Close() error + func (tx *Transaction) Closed() bool + func (tx *Transaction) Commit() error + func (tx *Transaction) CountContext(_ context.Context, s *schema.Schema, filter transaction.Filter) (uint64, error) + func (tx *Transaction) Create(resource *schema.Resource) error + func (tx *Transaction) CreateContext(_ context.Context, resource *schema.Resource) error + func (tx *Transaction) Delete(s *schema.Schema, resourceID interface{}) error + func (tx *Transaction) DeleteContext(_ context.Context, s *schema.Schema, resourceID interface{}) error + func (tx *Transaction) Exec(sql string, args ...interface{}) error + func (tx *Transaction) ExecContext(_ context.Context, sql string, args ...interface{}) error + func (tx *Transaction) Fetch(s *schema.Schema, filter transaction.Filter, options *transaction.ViewOptions) (*schema.Resource, error) + func (tx *Transaction) FetchContext(_ context.Context, s *schema.Schema, filter transaction.Filter, ...) (*schema.Resource, error) + func (tx *Transaction) GetIsolationLevel() transaction.Type + func (tx *Transaction) List(s *schema.Schema, filter transaction.Filter, options *transaction.ViewOptions, ...) (list []*schema.Resource, total uint64, err error) + func (tx *Transaction) ListContext(_ context.Context, s *schema.Schema, filter transaction.Filter, ...) (list []*schema.Resource, total uint64, err error) + func (tx *Transaction) LockFetch(s *schema.Schema, filter transaction.Filter, policy schema.LockPolicy, ...) (*schema.Resource, error) + func (tx *Transaction) LockFetchContext(_ context.Context, s *schema.Schema, filter transaction.Filter, ...) (*schema.Resource, error) + func (tx *Transaction) LockList(s *schema.Schema, filter transaction.Filter, options *transaction.ViewOptions, ...) (list []*schema.Resource, total uint64, err error) + func (tx *Transaction) LockListContext(_ context.Context, s *schema.Schema, filter transaction.Filter, ...) (list []*schema.Resource, total uint64, err error) + func (tx *Transaction) Query(s *schema.Schema, query string, arguments []interface{}) (list []*schema.Resource, err error) + func (tx *Transaction) QueryContext(_ context.Context, s *schema.Schema, query string, arguments []interface{}) (list []*schema.Resource, err error) + func (tx *Transaction) RawTransaction() *sqlx.Tx + func (tx *Transaction) SetIsolationLevel(level transaction.Type) error + func (tx *Transaction) StateFetch(s *schema.Schema, filter transaction.Filter) (state transaction.ResourceState, err error) + func (tx *Transaction) StateFetchContext(_ context.Context, s *schema.Schema, filter transaction.Filter) (state transaction.ResourceState, err error) + func (tx *Transaction) StateUpdate(resource *schema.Resource, _ *transaction.ResourceState) error + func (tx *Transaction) StateUpdateContext(_ context.Context, resource *schema.Resource, state *transaction.ResourceState) error + func (tx *Transaction) Update(resource *schema.Resource) error + func (tx *Transaction) UpdateContext(_ context.Context, resource *schema.Resource) error