sqlitedialect

package module
v1.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 2, 2024 License: BSD-2-Clause Imports: 9 Imported by: 112

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Version added in v1.0.22

func Version() string

Version is the current release version.

Types

type Dialect

type Dialect struct {
	schema.BaseDialect
	// contains filtered or unexported fields
}

func New

func New() *Dialect

func (*Dialect) AppendBytes added in v1.0.14

func (d *Dialect) AppendBytes(b []byte, bs []byte) []byte

func (*Dialect) AppendSequence added in v1.1.17

func (d *Dialect) AppendSequence(b []byte, table *schema.Table, field *schema.Field) []byte

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 (d *Dialect) DefaultVarcharLen() int

func (*Dialect) Features

func (d *Dialect) Features() feature.Feature

func (*Dialect) IdentQuote

func (d *Dialect) IdentQuote() byte

func (*Dialect) Init added in v0.2.14

func (d *Dialect) Init(*sql.DB)

func (*Dialect) Name

func (d *Dialect) Name() dialect.Name

func (*Dialect) OnTable

func (d *Dialect) OnTable(table *schema.Table)

func (*Dialect) Tables

func (d *Dialect) Tables() *schema.Tables

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL