Documentation ¶
Index ¶
- func GetListStructType(list interface{}) reflect.Type
- func GetSqlValue(columnType *sql.ColumnType, data interface{}) (value interface{})
- func SetStructColumnValues(columnValueMap map[string]interface{}, strValue reflect.Value, ...)
- type Operator
- type Opt
- func (o *Opt) Exec(ctx context.Context, db *sql.DB, dia dialect.Dialect, sqlInfo string, ...) (resultList sql.Result, err error)
- func (o *Opt) ExecTx(ctx context.Context, tx *sql.Tx, dia dialect.Dialect, sqlInfo string, ...) (resultList sql.Result, err error)
- func (o *Opt) Query(ctx context.Context, db *sql.DB, dia dialect.Dialect, sqlInfo string, ...) (err error)
- func (o *Opt) QueryPagination(ctx context.Context, db *sql.DB, dia dialect.Dialect, sqlInfo string, ...) (err error)
- func (o *Opt) QueryRowContext(ctx context.Context, db *sql.DB, dia dialect.Dialect, sqlInfo string, ...) *sql.Row
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetListStructType ¶
func GetSqlValue ¶
func GetSqlValue(columnType *sql.ColumnType, data interface{}) (value interface{})
Types ¶
type Operator ¶
type Operator interface { Exec(ctx context.Context, db *sql.DB, dia dialect.Dialect, sqlInfo string, args []interface{}) (resultList sql.Result, err error) ExecTx(ctx context.Context, tx *sql.Tx, dia dialect.Dialect, sqlInfo string, args []interface{}) (resultList sql.Result, err error) Query(ctx context.Context, db *sql.DB, dia dialect.Dialect, sqlInfo string, args []interface{}, list interface{}, depth int) (err error) QueryRowContext(ctx context.Context, db *sql.DB, dia dialect.Dialect, sqlInfo string, args []interface{}) *sql.Row QueryPagination(ctx context.Context, db *sql.DB, dia dialect.Dialect, sqlInfo string, args []interface{}, limit, offset int, list interface{}) (err error) }
type Opt ¶
type Opt struct { }
func (*Opt) Query ¶
func (o *Opt) Query(ctx context.Context, db *sql.DB, dia dialect.Dialect, sqlInfo string, args []interface{}, list interface{}, depth int) (err error)
直接查询
Click to show internal directories.
Click to hide internal directories.