Documentation ¶
Index ¶
- type Item
- type Mock
- func (m *Mock) AddItem(body []byte, err error, isCount bool)
- func (m *Mock) BatchInsertCopy(dbname, schema, table string, keys []string, values ...interface{}) (sc adapters.Scanner)
- func (m *Mock) BatchInsertCopyCtx(ctx context.Context, dbname, schema, table string, keys []string, ...) (sc adapters.Scanner)
- func (m *Mock) BatchInsertValues(SQL string, params ...interface{}) (sc adapters.Scanner)
- func (m *Mock) BatchInsertValuesCtx(ctx context.Context, SQL string, params ...interface{}) (sc adapters.Scanner)
- func (m *Mock) CountByRequest(req *http.Request) (countQuery string, err error)
- func (m *Mock) DatabaseClause(req *http.Request) (query string, hasCount bool)
- func (m *Mock) DatabaseOrderBy(order string, hasCount bool) (orderBy string)
- func (m *Mock) DatabaseWhere(requestWhere string) (whereSyntax string)
- func (m *Mock) Delete(SQL string, params ...interface{}) (sc adapters.Scanner)
- func (m *Mock) DeleteCtx(ctx context.Context, SQL string, params ...interface{}) (sc adapters.Scanner)
- func (m *Mock) DeleteSQL(database string, schema string, table string) (s string)
- func (m *Mock) DeleteWithTransaction(tx *sql.Tx, SQL string, params ...interface{}) (sc adapters.Scanner)
- func (m *Mock) DistinctClause(r *http.Request) (distinctQuery string, err error)
- func (m *Mock) ExecuteScripts(method string, sql string, values []interface{}) (sc adapters.Scanner)
- func (m *Mock) ExecuteScriptsCtx(ctx context.Context, method string, sql string, values []interface{}) (sc adapters.Scanner)
- func (m *Mock) FieldsPermissions(r *http.Request, table string, op string) (fields []string, err error)
- func (m *Mock) GetDatabase() (db string)
- func (m *Mock) GetScript(verb string, folder string, scriptName string) (script string, err error)
- func (m *Mock) GetTransaction() (tx *sql.Tx, err error)
- func (m *Mock) GetTransactionCtx(ctx context.Context) (tx *sql.Tx, err error)
- func (m *Mock) GroupByClause(r *http.Request) (groupBySQL string)
- func (m *Mock) Insert(SQL string, params ...interface{}) (sc adapters.Scanner)
- func (m *Mock) InsertCtx(ctx context.Context, SQL string, params ...interface{}) (sc adapters.Scanner)
- func (m *Mock) InsertSQL(database string, schema string, table string, names string, ...) (s string)
- func (m *Mock) InsertWithTransaction(tx *sql.Tx, SQL string, params ...interface{}) (sc adapters.Scanner)
- func (m *Mock) JoinByRequest(r *http.Request) (values []string, err error)
- func (m *Mock) Open(dsn string) (c driver.Conn, err error)
- func (m *Mock) OrderByRequest(r *http.Request) (values string, err error)
- func (m *Mock) PaginateIfPossible(r *http.Request) (paginatedQuery string, err error)
- func (m *Mock) ParseBatchInsertRequest(r *http.Request) (colsName string, placeholders string, values []interface{}, err error)
- func (m *Mock) ParseInsertRequest(r *http.Request) (colsName string, colsValue string, values []interface{}, err error)
- func (m *Mock) ParseScript(scriptPath string, data map[string]interface{}) (sqlQuery string, values []interface{}, err error)
- func (m *Mock) Query(SQL string, params ...interface{}) (sc adapters.Scanner)
- func (m *Mock) QueryCount(SQL string, params ...interface{}) (sc adapters.Scanner)
- func (m *Mock) QueryCountCtx(ctx context.Context, SQL string, params ...interface{}) (sc adapters.Scanner)
- func (m *Mock) QueryCtx(ctx context.Context, SQL string, params ...interface{}) (sc adapters.Scanner)
- func (m *Mock) ReturningByRequest(r *http.Request) (ReturningSyntax string, err error)
- func (m *Mock) SchemaClause(req *http.Request) (query string, hasCount bool)
- func (m *Mock) SchemaOrderBy(order string, hasCount bool) (orderBy string)
- func (m *Mock) SchemaTablesClause() (query string)
- func (m *Mock) SchemaTablesOrderBy(order string) (orderBy string)
- func (m *Mock) SchemaTablesWhere(requestWhere string) (whereSyntax string)
- func (m *Mock) SelectFields(fields []string) (sql string, err error)
- func (m *Mock) SelectSQL(selectStr string, database string, schema string, table string) (s string)
- func (m *Mock) SetByRequest(r *http.Request, initialPlaceholderID int) (setSyntax string, values []interface{}, err error)
- func (m *Mock) SetDatabase(name string)
- func (m *Mock) ShowTable(schema, table string) (sc adapters.Scanner)
- func (m *Mock) ShowTableCtx(ctx context.Context, schema, table string) (sc adapters.Scanner)
- func (m *Mock) TableClause() (query string)
- func (m *Mock) TableOrderBy(order string) (orderBy string)
- func (m *Mock) TablePermissions(table string, op string) (ok bool)
- func (m *Mock) TableWhere(requestWhere string) (whereSyntax string)
- func (m *Mock) Update(SQL string, params ...interface{}) (sc adapters.Scanner)
- func (m *Mock) UpdateCtx(ctx context.Context, SQL string, params ...interface{}) (sc adapters.Scanner)
- func (m *Mock) UpdateSQL(database string, schema string, table string, setSyntax string) (s string)
- func (m *Mock) UpdateWithTransaction(tx *sql.Tx, SQL string, params ...interface{}) (sc adapters.Scanner)
- func (m *Mock) WhereByRequest(r *http.Request, initialPlaceholderID int) (whereSyntax string, values []interface{}, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mock ¶
type Mock struct { Items []Item // contains filtered or unexported fields }
Mock adapter
func (*Mock) BatchInsertCopy ¶
func (m *Mock) BatchInsertCopy(dbname, schema, table string, keys []string, values ...interface{}) (sc adapters.Scanner)
BatchInsertCopy mock
func (*Mock) BatchInsertCopyCtx ¶
func (m *Mock) BatchInsertCopyCtx(ctx context.Context, dbname, schema, table string, keys []string, values ...interface{}) (sc adapters.Scanner)
BatchInsertCopyCtx mock
func (*Mock) BatchInsertValues ¶
BatchInsertValues mock
func (*Mock) BatchInsertValuesCtx ¶
func (m *Mock) BatchInsertValuesCtx(ctx context.Context, SQL string, params ...interface{}) (sc adapters.Scanner)
BatchInsertValuesCtx mock
func (*Mock) CountByRequest ¶
CountByRequest mock
func (*Mock) DatabaseClause ¶
DatabaseClause mock
func (*Mock) DatabaseOrderBy ¶
DatabaseOrderBy mock
func (*Mock) DatabaseWhere ¶
DatabaseWhere mock
func (*Mock) DeleteCtx ¶
func (m *Mock) DeleteCtx(ctx context.Context, SQL string, params ...interface{}) (sc adapters.Scanner)
DeleteCtx mock
func (*Mock) DeleteWithTransaction ¶
func (m *Mock) DeleteWithTransaction(tx *sql.Tx, SQL string, params ...interface{}) (sc adapters.Scanner)
DeleteWithTransaction mock
func (*Mock) DistinctClause ¶
DistinctClause mock
func (*Mock) ExecuteScripts ¶
func (m *Mock) ExecuteScripts(method string, sql string, values []interface{}) (sc adapters.Scanner)
ExecuteScripts mock
func (*Mock) ExecuteScriptsCtx ¶
func (m *Mock) ExecuteScriptsCtx(ctx context.Context, method string, sql string, values []interface{}) (sc adapters.Scanner)
ExecuteScripts mock
func (*Mock) FieldsPermissions ¶
func (m *Mock) FieldsPermissions(r *http.Request, table string, op string) (fields []string, err error)
FieldsPermissions mock
func (*Mock) GetTransaction ¶
GetTransaction mock
func (*Mock) GetTransactionCtx ¶
GetTransactionCtx mock
func (*Mock) GroupByClause ¶
GroupByClause mock
func (*Mock) InsertCtx ¶
func (m *Mock) InsertCtx(ctx context.Context, SQL string, params ...interface{}) (sc adapters.Scanner)
Insert mock
func (*Mock) InsertSQL ¶
func (m *Mock) InsertSQL(database string, schema string, table string, names string, placeholders string) (s string)
InsertSQL mock
func (*Mock) InsertWithTransaction ¶
func (m *Mock) InsertWithTransaction(tx *sql.Tx, SQL string, params ...interface{}) (sc adapters.Scanner)
InsertWithTransaction mock
func (*Mock) JoinByRequest ¶
JoinByRequest mock
func (*Mock) OrderByRequest ¶
OrderByRequest mock
func (*Mock) PaginateIfPossible ¶
PaginateIfPossible mock
func (*Mock) ParseBatchInsertRequest ¶
func (m *Mock) ParseBatchInsertRequest(r *http.Request) (colsName string, placeholders string, values []interface{}, err error)
ParseBatchInsertRequest mocl
func (*Mock) ParseInsertRequest ¶
func (m *Mock) ParseInsertRequest(r *http.Request) (colsName string, colsValue string, values []interface{}, err error)
ParseInsertRequest mock
func (*Mock) ParseScript ¶
func (m *Mock) ParseScript(scriptPath string, data map[string]interface{}) (sqlQuery string, values []interface{}, err error)
ParseScript mock
func (*Mock) QueryCount ¶
QueryCount mock
func (*Mock) QueryCountCtx ¶
func (m *Mock) QueryCountCtx(ctx context.Context, SQL string, params ...interface{}) (sc adapters.Scanner)
QueryCountCtx mock
func (*Mock) QueryCtx ¶
func (m *Mock) QueryCtx(ctx context.Context, SQL string, params ...interface{}) (sc adapters.Scanner)
QueryCtx mock
func (*Mock) ReturningByRequest ¶
ReturningByRequest mock
func (*Mock) SchemaClause ¶
SchemaClause mock
func (*Mock) SchemaOrderBy ¶
SchemaOrderBy mock
func (*Mock) SchemaTablesClause ¶
SchemaTablesClause mock
func (*Mock) SchemaTablesOrderBy ¶
SchemaTablesOrderBy mock
func (*Mock) SchemaTablesWhere ¶
SchemaTablesWhere mock
func (*Mock) SelectFields ¶
SelectFields mock
func (*Mock) SetByRequest ¶
func (m *Mock) SetByRequest(r *http.Request, initialPlaceholderID int) (setSyntax string, values []interface{}, err error)
SetByRequest mock
func (*Mock) ShowTableCtx ¶
ShowTableCtx shows table structure
func (*Mock) TableOrderBy ¶
TableOrderBy mock
func (*Mock) TablePermissions ¶
TablePermissions mock
func (*Mock) TableWhere ¶
TableWhere mock
func (*Mock) UpdateCtx ¶
func (m *Mock) UpdateCtx(ctx context.Context, SQL string, params ...interface{}) (sc adapters.Scanner)
UpdateCtx mock