Documentation ¶
Index ¶
- func WithBatchSize(n int) insertOptFunc
- func WithDDLSync(ddlSync DDLSync) insertOptFunc
- func WithInsertWorkers(n int) insertOptFunc
- func WithNullables(nullables ...string) insertOptFunc
- func WithTypeOverride(fn func(t dialect.Col) string) insertOptFunc
- type DB
- type DDLSync
- type Dialect
- type Iter
- type Q
- type Row
- type SQLExec
- type SQLQuery
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithBatchSize ¶
func WithBatchSize(n int) insertOptFunc
WithBatchSize sets the number of rows to insert in a single batch. might still execute multiple inserts.
func WithDDLSync ¶
func WithDDLSync(ddlSync DDLSync) insertOptFunc
WithDDLSync sets the DDL sync mode.
func WithInsertWorkers ¶
func WithInsertWorkers(n int) insertOptFunc
WithInsertWorkers sets the number of workers to use for inserting rows.
func WithNullables ¶
func WithNullables(nullables ...string) insertOptFunc
WithNullables sets the columns that can be null.
func WithTypeOverride ¶
WithTypeOverride uses the sql type returned by the func for col if the func returns an empty string, the default type is used.
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
type Dialect ¶
type Dialect interface { TableDef(ctx context.Context, db SQLQuery, name string) (dialect.Table, error) CreateTable(ctx context.Context, db SQLExec, name string, table dialect.Table) error AddColumns(ctx context.Context, db SQLExec, name string, table dialect.Table) error Insert(ctx context.Context, db SQLExec, name string, rows []Row) error }
Click to show internal directories.
Click to hide internal directories.