Documentation ¶
Index ¶
- func Version() string
- type Dialect
- func (d *Dialect) AppendBytes(b []byte, bs []byte) []byte
- func (d *Dialect) AppendSequence(b []byte, table *schema.Table, field *schema.Field) []byte
- func (d *Dialect) DefaultVarcharLen() int
- func (d *Dialect) Features() feature.Feature
- func (d *Dialect) IdentQuote() byte
- func (d *Dialect) Init(*sql.DB)
- func (d *Dialect) Name() dialect.Name
- func (d *Dialect) OnTable(table *schema.Table)
- func (d *Dialect) Tables() *schema.Tables
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Dialect ¶
type Dialect struct { schema.BaseDialect // contains filtered or unexported fields }
func (*Dialect) AppendBytes ¶ added in v1.0.14
func (*Dialect) AppendSequence ¶ added in v1.1.17
AppendSequence adds AUTOINCREMENT keyword to the column definition. As per documentation, AUTOINCREMENT is only valid for INTEGER PRIMARY KEY, and this method will be a noop for other columns.
Because this is a valid construct:
CREATE TABLE ("id" INTEGER PRIMARY KEY AUTOINCREMENT);
and this is not:
CREATE TABLE ("id" INTEGER AUTOINCREMENT, PRIMARY KEY ("id"));
AppendSequence adds a primary key constraint as a *side-effect*. Callers should expect it to avoid building invalid SQL. SQLite also does not support AUTOINCREMENT column in composite primary keys.
func (*Dialect) DefaultVarcharLen ¶ added in v1.1.10
func (*Dialect) IdentQuote ¶
Click to show internal directories.
Click to hide internal directories.