Versions in this module Expand all Collapse all v0 v0.0.3 Nov 29, 2025 Changes in this version + func GenerateDelete(db DbI, table string, where map[string]any, useOr bool) (sql string, args []any) + func GenerateInsert(db DbI, table string, fields map[string]any) (sql string, args []any) + func GenerateSelect(db DbI, table string, fieldNames []string, where map[string]any, ...) (sql string, args []any) + func GenerateUpdate(db DbI, table string, fields map[string]any, where map[string]any, useOr bool) (sql string, args []any) + func GenerateVersionLock(db DbI, table string, pkName string, pkValue any, versionName string, ...) (sql string, args []any) + func GetDataDefLength(description string) (l int, subLen int) + func NewSqlCursor(rows *sql.Rows, columnTypes []query.ReceiverType, columnNames []string, ...) query.CursorI + func ReceiveRows(rows *sql.Rows, columnTypes []query.ReceiverType, columnNames []string, ...) (values []map[string]any, err error) + func RowClose(c io.Closer) + type Base struct + func NewBase(dbKey string, db *sql.DB, dbi DbI) Base + func (h *Base) BuilderQuery(ctx context.Context, builder *Builder) (ret any, err error) + func (h *Base) CheckLock(ctx context.Context, table string, pkName string, pkValue any, ...) (newLock int64, err error) + func (h *Base) CreateSchema(ctx context.Context, s schema2.Database) error + func (h *Base) DbKey() string + func (h *Base) Delete(ctx context.Context, table string, primaryKey map[string]any, ...) error + func (h *Base) DeleteWhere(ctx context.Context, table string, where map[string]any) error + func (h *Base) DestroySchema(ctx context.Context, s schema2.Database) error + func (h *Base) IsInTransaction(ctx context.Context) (inTx bool) + func (h *Base) Query(ctx context.Context, table string, fields map[string]ReceiverType, ...) (CursorI, error) + func (h *Base) SqlDb() *sql.DB + func (h *Base) SqlExec(ctx context.Context, sql string, args ...interface{}) (r sql.Result, err error) + func (h *Base) SqlQuery(ctx context.Context, sql string, args ...interface{}) (r *sql.Rows, err error) + func (h *Base) StartProfiling() + func (h *Base) StopProfiling() + func (h *Base) WithSameConnection(ctx context.Context, f func(ctx context.Context) error) (err error) + func (h *Base) WithTransaction(ctx context.Context, f func(ctx context.Context) error) (err error) + type DbI interface + FormatArgument func(n int) string + QuoteIdentifier func(string) string + SqlExec func(ctx context.Context, sql string, args ...interface{}) (r sql.Result, err error) + SqlQuery func(ctx context.Context, sql string, args ...interface{}) (r *sql.Rows, err error) + SupportsForUpdate func() bool + TableDefinitionSql func(d *schema2.Database, table *schema2.Table) (tableSql string, extraSql []string) + type SqlReceiver struct + R interface{} + func (r SqlReceiver) Unpack(typ ReceiverType) interface{} + func (r SqlReceiver) UnpackDefaultValue(typ schema.ColumnType, size int) interface{}