Documentation ¶
Index ¶
- func NewRowsAffectedResult(rowsAffected int64) sql.Result
- type AutoIncrKeyer
- type ColumnValuer
- type Columner
- type CompositeKeyer
- type ConvertFunc
- type DB
- type Databaser
- type EmptyResult
- type Inserter
- type KeyDeleter
- type KeyFinder
- type KeyUpdater
- type KeyValueScanner
- type KeyValuer
- type Keyer
- type OrderByClause
- type PrimaryKeyer
- type PtrScanner
- type QueryFunc
- type SQLColumnValuer
- type SQLColumner
- type Scanner
- type SetClause
- type SingleInserter
- type Stmt
- type StmtBuilder
- type StmtWriter
- type TableColumnValuer
- type TableName
- type Tabler
- type Valuer
- type WhereClause
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRowsAffectedResult ¶
Types ¶
type AutoIncrKeyer ¶
type AutoIncrKeyer interface { PrimaryKeyer IsAutoIncr() }
type ColumnValuer ¶
type ColumnValuer[T any] interface { ColumnName() string Convert(T) driver.Value Value() driver.Value }
func Column ¶
func Column[T any](columnName string, value T, convert ConvertFunc[T]) ColumnValuer[T]
type CompositeKeyer ¶
type ConvertFunc ¶
type EmptyResult ¶
type EmptyResult struct{}
func (EmptyResult) LastInsertId ¶
func (EmptyResult) LastInsertId() (int64, error)
func (EmptyResult) RowsAffected ¶
func (EmptyResult) RowsAffected() (int64, error)
type Inserter ¶
type Inserter interface { TableColumnValuer InsertPlaceholders(row int) string }
type KeyDeleter ¶
type KeyUpdater ¶
type KeyValueScanner ¶
type KeyValueScanner[T any] interface { KeyValuer PtrScanner[T] }
type OrderByClause ¶
func OrderByColumn ¶
func OrderByColumn(columnName string, asc bool) OrderByClause
type PtrScanner ¶
type SQLColumnValuer ¶
type SQLColumnValuer[T any] interface { ColumnName() string Convert(T) driver.Value Value() driver.Value SQLValue(placeholder string) string }
func SQLColumn ¶
func SQLColumn[T any](columnName string, value T, sqlValue QueryFunc, convert ConvertFunc[T]) SQLColumnValuer[T]
type SQLColumner ¶
type SQLColumner interface {
SQLColumns() []string
}
type SetClause ¶
type SetClause func(StmtBuilder)
type SingleInserter ¶
type StmtBuilder ¶
type StmtBuilder interface { StmtWriter Var(v any) string // Vars will group the valus in parenthesis Vars(vals []any) string }
type StmtWriter ¶
type StmtWriter interface { io.Writer io.StringWriter io.ByteWriter }
type TableColumnValuer ¶
type WhereClause ¶
type WhereClause func(StmtBuilder)
Click to show internal directories.
Click to hide internal directories.