Documentation ¶
Index ¶
- Variables
- func Count(dialect SqlExcutor, tableName string, cond stmt.ConditionStmt) func(ctx context.Context, tx Preparer) (count int, err error)
- func ExecContext(ctx context.Context, tx Preparer, query string, args []interface{}) (affected int64, lastid int64, err error)
- func Exist(dialect SqlExcutor, tableName string, cond stmt.ConditionStmt) func(ctx context.Context, tx Preparer) (exist bool, err error)
- func QueryRowContext(ctx context.Context, tx Preparer, query string, args []interface{}) func(CallbackScanner) error
- func QueryRowsContext(ctx context.Context, tx Preparer, query string, args []interface{}) func(CallbackScanner) error
- func Repeat(n int, s string) []string
- func VANILLA_DEBUG_PRINT(query string, args []interface{})
- type CallbackScanner
- type ConditionStmt
- type ConditionStmtResolverSet
- type FakeResolver
- func (flavor FakeResolver) Count(tableName string, cond stmt.ConditionStmt) func(ctx context.Context, tx Preparer) (count int, err error)
- func (flavor FakeResolver) Delete(table_name string, q ConditionStmt) func(ctx context.Context, tx Preparer) (affected int64, err error)
- func (flavor FakeResolver) Exist(tableName string, cond stmt.ConditionStmt) func(ctx context.Context, tx Preparer) (exist bool, err error)
- func (flavor FakeResolver) Insert(table_name string, columns []string, values ...[]interface{}) ...
- func (flavor FakeResolver) QueryRow(table_name string, columns []string, q ConditionStmt) func(ctx context.Context, tx Preparer) func(CallbackScanner) error
- func (flavor FakeResolver) QueryRows(table_name string, columns []string, q ConditionStmt, o OrderStmt, ...) func(ctx context.Context, tx Preparer) func(CallbackScanner) error
- func (flavor FakeResolver) Update(table_name string, keys_values map[string]interface{}, q ConditionStmt) func(ctx context.Context, tx Preparer) (affected int64, err error)
- func (flavor FakeResolver) Upsert(table_name string, insert_columns []string, update_columns []string, ...) ...
- type OrderStmt
- type PaginationStmt
- type Preparer
- type Scanner
- type SqlExcutor
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // export for resolver's SetSqlExcutor SetSqlExcutor = collection.SetSqlExcutor // get condition resolver GetSqlExcutor = collection.SqlExcutor )
View Source
var CauseIter = stmt.CauseIter
View Source
var ErrorCompose = stmt.ErrorCompose
Functions ¶
func Count ¶
func Count(dialect SqlExcutor, tableName string, cond stmt.ConditionStmt) func(ctx context.Context, tx Preparer) (count int, err error)
func ExecContext ¶
func Exist ¶
func Exist(dialect SqlExcutor, tableName string, cond stmt.ConditionStmt) func(ctx context.Context, tx Preparer) (exist bool, err error)
func QueryRowContext ¶
func QueryRowsContext ¶
func VANILLA_DEBUG_PRINT ¶
func VANILLA_DEBUG_PRINT(query string, args []interface{})
Types ¶
type CallbackScanner ¶
type ConditionStmt ¶
type ConditionStmt = stmt.ConditionStmt
type ConditionStmtResolverSet ¶
type ConditionStmtResolverSet = map[string]SqlExcutor
type FakeResolver ¶
type FakeResolver struct {
// contains filtered or unexported fields
}
func (FakeResolver) Count ¶
func (flavor FakeResolver) Count(tableName string, cond stmt.ConditionStmt) func(ctx context.Context, tx Preparer) (count int, err error)
func (FakeResolver) Delete ¶
func (flavor FakeResolver) Delete(table_name string, q ConditionStmt) func(ctx context.Context, tx Preparer) (affected int64, err error)
func (FakeResolver) Exist ¶
func (flavor FakeResolver) Exist(tableName string, cond stmt.ConditionStmt) func(ctx context.Context, tx Preparer) (exist bool, err error)
func (FakeResolver) QueryRow ¶
func (flavor FakeResolver) QueryRow(table_name string, columns []string, q ConditionStmt) func(ctx context.Context, tx Preparer) func(CallbackScanner) error
func (FakeResolver) QueryRows ¶
func (flavor FakeResolver) QueryRows(table_name string, columns []string, q ConditionStmt, o OrderStmt, p PaginationStmt) func(ctx context.Context, tx Preparer) func(CallbackScanner) error
type PaginationStmt ¶
type PaginationStmt = stmt.PaginationStmt
type SqlExcutor ¶
type SqlExcutor interface { // Insert Insert(table_name string, columns []string, values ...[]interface{}) func(ctx context.Context, tx Preparer) (affected int64, lastid int64, err error) // Upsert Upsert(table_name string, insert_columns []string, update_columns []string, values ...[]interface{}) func(ctx context.Context, tx Preparer) (affected int64, lastid int64, err error) // Update Update(table_name string, keys_values map[string]interface{}, q ConditionStmt) func(ctx context.Context, tx Preparer) (affected int64, err error) // QueryRow QueryRow(table_name string, columns []string, q ConditionStmt) func(ctx context.Context, tx Preparer) func(CallbackScanner) error // QueryRows QueryRows(table_name string, columns []string, q ConditionStmt, o OrderStmt, p PaginationStmt) func(ctx context.Context, tx Preparer) func(CallbackScanner) error // Delete Delete(table_name string, q ConditionStmt) func(ctx context.Context, tx Preparer) (affected int64, err error) // Count Count(tableName string, cond stmt.ConditionStmt) func(ctx context.Context, tx Preparer) (count int, err error) // Exist Exist(tableName string, cond stmt.ConditionStmt) func(ctx context.Context, tx Preparer) (exist bool, err error) }
SqlExcutor
Click to show internal directories.
Click to hide internal directories.