Documentation ¶
Index ¶
- Constants
- Variables
- type SQLite3Dialect
- func (s SQLite3Dialect) AddColumnToTable(tableName, key string, jt dynsql.JSONType, x dynsql.ExecerQueryer) error
- func (s SQLite3Dialect) CreateNewTable(tableName string, keys []string, types []dynsql.JSONType, ...) error
- func (s SQLite3Dialect) GetAllTableColumns(tableName string, x dynsql.ExecerQueryer) (map[string]string, error)
- func (s SQLite3Dialect) GetAllTableNames(x dynsql.ExecerQueryer) ([]string, error)
- func (s SQLite3Dialect) InsertValuesPrepare(tableName string, keys []string, x dynsql.ExecerQueryerPreparer) (driver.Stmt, error)
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)
Click to show internal directories.
Click to hide internal directories.