Documentation ¶
Index ¶
- func New() dbal.Grammar
- type Quoter
- type SQLite3
- func (grammarSQL SQLite3) AlterTable(table *dbal.Table) error
- func (grammarSQL SQLite3) CompileDelete(query *dbal.Query) (string, []interface{})
- func (grammarSQL SQLite3) CompileInsertOrIgnore(query *dbal.Query, columns []interface{}, values [][]interface{}) (string, []interface{})
- func (grammarSQL SQLite3) CompileLock(query *dbal.Query, lock interface{}) string
- func (grammarSQL SQLite3) CompileSelect(query *dbal.Query) string
- func (grammarSQL SQLite3) CompileSelectOffset(query *dbal.Query, offset *int) string
- func (grammarSQL SQLite3) CompileTruncate(query *dbal.Query) ([]string, [][]interface{})
- func (grammarSQL SQLite3) CompileUpdate(query *dbal.Query, values map[string]interface{}) (string, []interface{})
- func (grammarSQL SQLite3) CompileUpsert(query *dbal.Query, columns []interface{}, values [][]interface{}, ...) (string, []interface{})
- func (grammarSQL SQLite3) CompileWheres(query *dbal.Query, wheres []dbal.Where, bindingOffset *int) string
- func (grammarSQL SQLite3) CreateTable(table *dbal.Table) error
- func (grammarSQL SQLite3) ExecSQL(table *dbal.Table, sql string) error
- func (grammarSQL SQLite3) GetColumnListing(schemaName string, tableName string) ([]*dbal.Column, error)
- func (grammarSQL SQLite3) GetConstraintListing(schemaName string, tableName string) (map[string]*dbal.Constraint, error)
- func (grammarSQL SQLite3) GetIndexListing(dbName string, tableName string) ([]*dbal.Index, error)
- func (grammarSQL SQLite3) GetOperators() []string
- func (grammarSQL SQLite3) GetTable(name string) (*dbal.Table, error)
- func (grammarSQL SQLite3) GetTables() ([]string, error)
- func (grammarSQL SQLite3) GetVersion() (*dbal.Version, error)
- func (grammarSQL SQLite3) NewWith(db *sqlx.DB, config *dbal.Config, option *dbal.Option) (dbal.Grammar, error)
- func (grammarSQL SQLite3) NewWithRead(write *sqlx.DB, writeConfig *dbal.Config, read *sqlx.DB, ...) (dbal.Grammar, error)
- func (grammarSQL SQLite3) ParseType(column *dbal.Column)
- func (grammarSQL SQLite3) RenameTable(old string, new string) error
- func (grammarSQL SQLite3) SQLAddColumn(column *dbal.Column) string
- func (grammarSQL SQLite3) SQLAddIndex(index *dbal.Index) string
- func (grammarSQL SQLite3) SQLAddPrimary(primary *dbal.Primary) string
- func (grammarSQL SQLite3) TableExists(name string) (bool, error)
- func (grammarSQL SQLite3) WhereDate(query *dbal.Query, where dbal.Where, bindingOffset *int) string
- func (grammarSQL SQLite3) WhereDateBased(typ string, query *dbal.Query, where dbal.Where, bindingOffset *int) string
- func (grammarSQL SQLite3) WhereDay(query *dbal.Query, where dbal.Where, bindingOffset *int) string
- func (grammarSQL SQLite3) WhereMonth(query *dbal.Query, where dbal.Where, bindingOffset *int) string
- func (grammarSQL SQLite3) WhereTime(query *dbal.Query, where dbal.Where, bindingOffset *int) string
- func (grammarSQL SQLite3) WhereYear(query *dbal.Query, where dbal.Where, bindingOffset *int) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type SQLite3 ¶
SQLite3 the sqlite3 Grammar
func (SQLite3) AlterTable ¶ added in v0.0.3
AlterTable alter a table on the schema
func (SQLite3) CompileDelete ¶ added in v0.5.1
CompileDelete Compile a delete statement into SQL.
func (SQLite3) CompileInsertOrIgnore ¶ added in v0.5.1
func (grammarSQL SQLite3) CompileInsertOrIgnore(query *dbal.Query, columns []interface{}, values [][]interface{}) (string, []interface{})
CompileInsertOrIgnore Compile an insert ignore statement into SQL.
func (SQLite3) CompileLock ¶ added in v0.5.1
CompileLock the lock into SQL.
func (SQLite3) CompileSelect ¶ added in v0.5.1
CompileSelect Compile a select query into SQL.
func (SQLite3) CompileSelectOffset ¶ added in v0.5.1
CompileSelectOffset Compile a select query into SQL.
func (SQLite3) CompileTruncate ¶ added in v0.5.1
CompileTruncate Compile a truncate table statement into SQL.
func (SQLite3) CompileUpdate ¶ added in v0.5.1
func (grammarSQL SQLite3) CompileUpdate(query *dbal.Query, values map[string]interface{}) (string, []interface{})
CompileUpdate Compile an update statement into SQL.
func (SQLite3) CompileUpsert ¶ added in v0.5.1
func (grammarSQL SQLite3) CompileUpsert(query *dbal.Query, columns []interface{}, values [][]interface{}, uniqueBy []interface{}, updateValues interface{}) (string, []interface{})
CompileUpsert Upsert new records or update the existing ones.
func (SQLite3) CompileWheres ¶ added in v0.5.1
func (grammarSQL SQLite3) CompileWheres(query *dbal.Query, wheres []dbal.Where, bindingOffset *int) string
CompileWheres Compile an update statement into SQL.
func (SQLite3) CreateTable ¶ added in v0.0.3
CreateTable create a new table on the schema
func (SQLite3) GetColumnListing ¶
func (grammarSQL SQLite3) GetColumnListing(schemaName string, tableName string) ([]*dbal.Column, error)
GetColumnListing get a table columns structure
func (SQLite3) GetConstraintListing ¶ added in v0.0.3
func (grammarSQL SQLite3) GetConstraintListing(schemaName string, tableName string) (map[string]*dbal.Constraint, error)
GetConstraintListing get the constraints of the table
func (SQLite3) GetIndexListing ¶
GetIndexListing get a table indexes structure
func (SQLite3) GetOperators ¶ added in v0.5.1
GetOperators get the operators
func (SQLite3) GetVersion ¶ added in v0.0.3
GetVersion get the version of the connection database
func (SQLite3) NewWith ¶ added in v0.0.3
func (grammarSQL SQLite3) NewWith(db *sqlx.DB, config *dbal.Config, option *dbal.Option) (dbal.Grammar, error)
NewWith Create a new grammar interface, using the given *sqlx.DB, *dbal.Config and *dbal.Option.
func (SQLite3) NewWithRead ¶ added in v0.5.1
func (grammarSQL SQLite3) NewWithRead(write *sqlx.DB, writeConfig *dbal.Config, read *sqlx.DB, readConfig *dbal.Config, option *dbal.Option) (dbal.Grammar, error)
NewWithRead Create a new grammar interface, using the given *sqlx.DB, *dbal.Config and *dbal.Option.
func (SQLite3) RenameTable ¶ added in v0.0.3
RenameTable rename a table on the schema.
func (SQLite3) SQLAddColumn ¶ added in v0.0.3
SQLAddColumn return the add column sql for table create
func (SQLite3) SQLAddIndex ¶ added in v0.0.3
SQLAddIndex return the add index sql for table create
func (SQLite3) SQLAddPrimary ¶ added in v0.0.3
SQLAddPrimary return the add primary key sql for table create
func (SQLite3) TableExists ¶ added in v0.0.3
TableExists check if the table exists
func (SQLite3) WhereDateBased ¶ added in v0.5.1
func (grammarSQL SQLite3) WhereDateBased(typ string, query *dbal.Query, where dbal.Where, bindingOffset *int) string
WhereDateBased Compile a date based where clause.
func (SQLite3) WhereMonth ¶ added in v0.5.1
func (grammarSQL SQLite3) WhereMonth(query *dbal.Query, where dbal.Where, bindingOffset *int) string
WhereMonth Compile a "where month" clause.