sqlite3

package
v0.0.0-...-9d8e397 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2019 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

View Source
const AlterTableAddColumnSQL = `ALTER TABLE %s ADD COLUMN %s %s;`
View Source
const CreateNewTableSQL = `CREATE TABLE %s (%s);`
View Source
const DefaultFallbackType = "TEXT"
View Source
const InsertValuesSQL = `INSERT INTO %s (%s) VALUES (%s);`
View Source
const SelectAllTableColumnsSQL = `SELECT sql FROM sqlite_master 
WHERE type = 'table' AND name = '%s';`
View Source
const SelectAllTableNamesSQL = `SELECT name FROM sqlite_master 
WHERE type = 'table';`

Variables

View Source
var (
	DefaultTypeMap      = map[string]string{}
	JSONTypeTranslation = map[dynsql.JSONType]string{
		dynsql.JSONBoolean: "BOOLEAN",
		dynsql.JSONNumber:  "NUMBER",
		dynsql.JSONString:  "TEXT",
	}
	ColumnNameAndTypeRegex = regexp.MustCompile(`(?:\(|\,\s*|\t)(?P<Key>[a-zA-Z\_\-]+)(?:\s*)(?P<Type>[a-zA-Z\_\-]+)(?:\s*)`)
)

Functions

This section is empty.

Types

type SQLite3Dialect

type SQLite3Dialect int

func (SQLite3Dialect) AddColumnToTable

func (s SQLite3Dialect) AddColumnToTable(tableName, key string, jt dynsql.JSONType, x dynsql.ExecerQueryer) error

func (SQLite3Dialect) CreateNewTable

func (s SQLite3Dialect) CreateNewTable(tableName string, keys []string, types []dynsql.JSONType, x dynsql.ExecerQueryer) error

func (SQLite3Dialect) GetAllTableColumns

func (s SQLite3Dialect) GetAllTableColumns(tableName string, x dynsql.ExecerQueryer) (map[string]string, error)

func (SQLite3Dialect) GetAllTableNames

func (s SQLite3Dialect) GetAllTableNames(x dynsql.ExecerQueryer) ([]string, error)

func (SQLite3Dialect) InsertValuesPrepare

func (s SQLite3Dialect) InsertValuesPrepare(tableName string, keys []string, x dynsql.ExecerQueryerPreparer) (driver.Stmt, error)

Jump to

Keyboard shortcuts

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