Documentation ¶
Index ¶
- func NewTestDB(driver string) *sql.DB
- type Row
- type Rows
- type TestModelScanner
- func (t *TestModelScanner[B]) ScanAny(rows preform.IRows, cols []preform.ICol, max uint64) ([]any, error)
- func (t *TestModelScanner[B]) ScanBodies(rows preform.IRows, cols []preform.ICol, max uint64) ([]B, error)
- func (t *TestModelScanner[B]) ScanBodiesFast(rows preform.IRows, cols []preform.ICol, max uint64) ([]B, error)
- func (t *TestModelScanner[B]) ScanBody(row preform.IRow, cols []preform.ICol) (*B, error)
- func (t *TestModelScanner[B]) ScanCount(rows preform.IRows) (uint64, error)
- func (t *TestModelScanner[B]) ScanRaw(rows preform.IRows, colValTpl []func() (any, func(*any) any), max uint64) (*preform.RowsWithCols, error)
- func (t *TestModelScanner[B]) ScanStructs(rows preform.IRows, s any) error
- func (t *TestModelScanner[B]) ToAnyScanner() preform.IModelScanner[any]
- type TestQueryRunner
- func (t *TestQueryRunner) AddToQueryRows(value [][]driver.Value, columns ...[]string)
- func (t *TestQueryRunner) AddToQueryxRows(value [][]driver.Value, columns ...[]string)
- func (t *TestQueryRunner) BaseRunner() preformShare.DbQueryRunner
- func (t *TestQueryRunner) Exec(query string, args ...interface{}) (sql.Result, error)
- func (t *TestQueryRunner) ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error)
- func (t *TestQueryRunner) InsertAndReturnAutoId(ctx context.Context, lastIdMethod preformShare.SqlDialectLastInsertIdMethod, ...) (int64, error)
- func (t *TestQueryRunner) IsTester()
- func (t *TestQueryRunner) Prepare(query string) (*sql.Stmt, error)
- func (t *TestQueryRunner) PrepareContext(ctx context.Context, query string) (*sql.Stmt, error)
- func (t *TestQueryRunner) Preparex(query string) (*sqlx.Stmt, error)
- func (t *TestQueryRunner) PreparexContext(ctx context.Context, query string) (*sqlx.Stmt, error)
- func (t *TestQueryRunner) Query(query string, args ...interface{}) (*sql.Rows, error)
- func (t *TestQueryRunner) QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error)
- func (t *TestQueryRunner) QueryRow(query string, args ...interface{}) *sql.Row
- func (t *TestQueryRunner) QueryRowContext(ctx context.Context, query string, args ...interface{}) *sql.Row
- func (t *TestQueryRunner) QueryRowx(query string, args ...interface{}) *sqlx.Row
- func (t *TestQueryRunner) QueryRowxContext(ctx context.Context, query string, args ...interface{}) *sqlx.Row
- func (t *TestQueryRunner) Queryx(query string, args ...interface{}) (*sqlx.Rows, error)
- func (t *TestQueryRunner) QueryxContext(ctx context.Context, query string, args ...interface{}) (*sqlx.Rows, error)
- func (t *TestQueryRunner) RelatedFactory([]preformShare.IQueryFactory) preformShare.QueryRunner
- type TestSqlConnector
- type TestSqlConnectorDriver
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type TestModelScanner ¶
type TestModelScanner[B any] struct { ErrorQueue []error CountQueue []uint64 AnyQueue []any BodyQueue []*B BodiesQueue [][]B RawQueue []*preform.RowsWithCols }
func NewTestModelScanner ¶
func NewTestModelScanner[B any]() *TestModelScanner[B]
func (*TestModelScanner[B]) ScanBodies ¶
func (*TestModelScanner[B]) ScanBodiesFast ¶
func (*TestModelScanner[B]) ScanCount ¶
func (t *TestModelScanner[B]) ScanCount(rows preform.IRows) (uint64, error)
func (*TestModelScanner[B]) ScanRaw ¶
func (t *TestModelScanner[B]) ScanRaw(rows preform.IRows, colValTpl []func() (any, func(*any) any), max uint64) (*preform.RowsWithCols, error)
func (*TestModelScanner[B]) ScanStructs ¶
func (t *TestModelScanner[B]) ScanStructs(rows preform.IRows, s any) error
func (*TestModelScanner[B]) ToAnyScanner ¶
func (t *TestModelScanner[B]) ToAnyScanner() preform.IModelScanner[any]
type TestQueryRunner ¶
type TestQueryRunner struct { ErrorQueue []error LastIdQueue []int64 AffectedQueue []int64 StmtQueue []*sql.Stmt QueryRows []*sql.Rows QueryxRows []*sqlx.Rows }
func NewTestQueryRunner ¶
func NewTestQueryRunner() *TestQueryRunner
func (*TestQueryRunner) AddToQueryRows ¶
func (t *TestQueryRunner) AddToQueryRows(value [][]driver.Value, columns ...[]string)
func (*TestQueryRunner) AddToQueryxRows ¶
func (t *TestQueryRunner) AddToQueryxRows(value [][]driver.Value, columns ...[]string)
func (*TestQueryRunner) BaseRunner ¶
func (t *TestQueryRunner) BaseRunner() preformShare.DbQueryRunner
func (*TestQueryRunner) Exec ¶
func (t *TestQueryRunner) Exec(query string, args ...interface{}) (sql.Result, error)
func (*TestQueryRunner) ExecContext ¶
func (*TestQueryRunner) InsertAndReturnAutoId ¶
func (t *TestQueryRunner) InsertAndReturnAutoId(ctx context.Context, lastIdMethod preformShare.SqlDialectLastInsertIdMethod, query string, args ...any) (int64, error)
func (*TestQueryRunner) IsTester ¶
func (t *TestQueryRunner) IsTester()
func (*TestQueryRunner) Prepare ¶
func (t *TestQueryRunner) Prepare(query string) (*sql.Stmt, error)
func (*TestQueryRunner) PrepareContext ¶
func (*TestQueryRunner) Preparex ¶
func (t *TestQueryRunner) Preparex(query string) (*sqlx.Stmt, error)
func (*TestQueryRunner) PreparexContext ¶
func (*TestQueryRunner) Query ¶
func (t *TestQueryRunner) Query(query string, args ...interface{}) (*sql.Rows, error)
func (*TestQueryRunner) QueryContext ¶
func (*TestQueryRunner) QueryRow ¶
func (t *TestQueryRunner) QueryRow(query string, args ...interface{}) *sql.Row
func (*TestQueryRunner) QueryRowContext ¶
func (*TestQueryRunner) QueryRowx ¶
func (t *TestQueryRunner) QueryRowx(query string, args ...interface{}) *sqlx.Row
func (*TestQueryRunner) QueryRowxContext ¶
func (*TestQueryRunner) Queryx ¶
func (t *TestQueryRunner) Queryx(query string, args ...interface{}) (*sqlx.Rows, error)
func (*TestQueryRunner) QueryxContext ¶
func (*TestQueryRunner) RelatedFactory ¶
func (t *TestQueryRunner) RelatedFactory([]preformShare.IQueryFactory) preformShare.QueryRunner
type TestSqlConnector ¶
type TestSqlConnector struct {
// contains filtered or unexported fields
}
func (TestSqlConnector) Driver ¶
func (t TestSqlConnector) Driver() driver.Driver
type TestSqlConnectorDriver ¶
type TestSqlConnectorDriver struct {
// contains filtered or unexported fields
}
func (TestSqlConnectorDriver) Open ¶
func (t TestSqlConnectorDriver) Open(name string) (driver.Conn, error)
func (TestSqlConnectorDriver) TestDriverName ¶
func (t TestSqlConnectorDriver) TestDriverName() string
Click to show internal directories.
Click to hide internal directories.