Documentation
¶
Index ¶
- func ScriptMigration(script string) func(*sql.Tx) error
- type ArgList
- type Builder
- func (b *Builder) Exec(e DB) (sql.Result, error)
- func (b *Builder) Printf(format string, a ...any)
- func (b *Builder) Query(q DB) (*sql.Rows, error)
- func (b *Builder) QueryRow(q DB) *sql.Row
- func (b *Builder) Reset()
- func (b *Builder) ScanRow(db DB, dest ...any) error
- func (b *Builder) ScanRows(q DB, s RowScanner) error
- func (b *Builder) String() string
- type DB
- type Dialect
- type FieldList
- type MappedSlice
- type Migration
- type Raw
- type RawBuilder
- type RawList
- type RawStringer
- type RowScanner
- type ScanFunc
- type Slice
- type Struct
- type ValList
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ArgList ¶ added in v0.0.9
type ArgList interface {
ArgListSQLUTIL() []any
}
ArgList allows to use a single slice as multiple Scan arguments
type FieldList ¶
FieldList creates a list of col .. val ... col .. val. OP specifies what comes between col and val, default is " = "" JoinBy specifies what comes between pairs, default is ", "
func (FieldList) RawString ¶
func (l FieldList) RawString(b RawBuilder) string
type MappedSlice ¶ added in v0.0.9
type MappedSlice[T, D any] struct { Tag string // do not change after ScanRows has been called Map func(t D) T S []T // contains filtered or unexported fields }
func (*MappedSlice[T, D]) Cols ¶ added in v0.0.9
func (s *MappedSlice[T, D]) Cols(prefix string) RawList
type RawBuilder ¶
type RawBuilder struct {
// contains filtered or unexported fields
}
func (RawBuilder) Param ¶
func (b RawBuilder) Param(val any) string
Param converts val to a value safe to use in SQL. if it is Raw, the value will be returned. In any other case a parameter will be created
type RawList ¶
type RawList []string
RawList is a string slice that will be used as a comma seperated list of raw strings.
func (RawList) RawString ¶
func (s RawList) RawString(b RawBuilder) string
type RawStringer ¶
type RawStringer interface {
RawString(b RawBuilder) string
}
type RowScanner ¶ added in v0.0.9
type ScanFunc ¶ added in v0.0.9
type ScanFunc struct {
Dest []any
Add func()
// contains filtered or unexported fields
}
type Slice ¶ added in v0.0.9
type Struct ¶ added in v0.0.11
Click to show internal directories.
Click to hide internal directories.