sqlite3

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() dbal.Grammar

New Create a new mysql grammar inteface

Types

type Quoter added in v0.5.1

type Quoter struct {
	sql.Quoter
}

Quoter the database quoting query text SQL type

func (*Quoter) WrapUnion added in v0.5.1

func (quoter *Quoter) WrapUnion(sql string) string

WrapUnion a union subquery in parentheses.

type SQLite3

type SQLite3 struct {
	sql.SQL
}

SQLite3 the sqlite3 Grammar

func (SQLite3) AlterTable added in v0.0.3

func (grammarSQL SQLite3) AlterTable(table *dbal.Table) error

AlterTable alter a table on the schema

func (SQLite3) CompileDelete added in v0.5.1

func (grammarSQL SQLite3) CompileDelete(query *dbal.Query) (string, []interface{})

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

func (grammarSQL SQLite3) CompileLock(query *dbal.Query, lock interface{}) string

CompileLock the lock into SQL.

func (SQLite3) CompileSelect added in v0.5.1

func (grammarSQL SQLite3) CompileSelect(query *dbal.Query) string

CompileSelect Compile a select query into SQL.

func (SQLite3) CompileSelectOffset added in v0.5.1

func (grammarSQL SQLite3) CompileSelectOffset(query *dbal.Query, offset *int) string

CompileSelectOffset Compile a select query into SQL.

func (SQLite3) CompileTruncate added in v0.5.1

func (grammarSQL SQLite3) CompileTruncate(query *dbal.Query) ([]string, [][]interface{})

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

func (grammarSQL SQLite3) CreateTable(table *dbal.Table) error

CreateTable create a new table on the schema

func (SQLite3) ExecSQL

func (grammarSQL SQLite3) ExecSQL(table *dbal.Table, sql string) error

ExecSQL execute sql then update table structure

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

func (grammarSQL SQLite3) GetIndexListing(dbName string, tableName string) ([]*dbal.Index, error)

GetIndexListing get a table indexes structure

func (SQLite3) GetOperators added in v0.5.1

func (grammarSQL SQLite3) GetOperators() []string

GetOperators get the operators

func (SQLite3) GetTable added in v0.0.3

func (grammarSQL SQLite3) GetTable(name string) (*dbal.Table, error)

GetTable get a table on the schema

func (SQLite3) GetTables added in v0.0.3

func (grammarSQL SQLite3) GetTables() ([]string, error)

GetTables Get all of the table names for the database.

func (SQLite3) GetVersion added in v0.0.3

func (grammarSQL SQLite3) GetVersion() (*dbal.Version, error)

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) ParseType added in v0.0.3

func (grammarSQL SQLite3) ParseType(column *dbal.Column)

ParseType parse type and flip to DBAL

func (SQLite3) RenameTable added in v0.0.3

func (grammarSQL SQLite3) RenameTable(old string, new string) error

RenameTable rename a table on the schema.

func (SQLite3) SQLAddColumn added in v0.0.3

func (grammarSQL SQLite3) SQLAddColumn(column *dbal.Column) string

SQLAddColumn return the add column sql for table create

func (SQLite3) SQLAddIndex added in v0.0.3

func (grammarSQL SQLite3) SQLAddIndex(index *dbal.Index) string

SQLAddIndex return the add index sql for table create

func (SQLite3) SQLAddPrimary added in v0.0.3

func (grammarSQL SQLite3) SQLAddPrimary(primary *dbal.Primary) string

SQLAddPrimary return the add primary key sql for table create

func (SQLite3) TableExists added in v0.0.3

func (grammarSQL SQLite3) TableExists(name string) (bool, error)

TableExists check if the table exists

func (SQLite3) WhereDate added in v0.5.1

func (grammarSQL SQLite3) WhereDate(query *dbal.Query, where dbal.Where, bindingOffset *int) string

WhereDate Compile a "where date" clause.

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) WhereDay added in v0.5.1

func (grammarSQL SQLite3) WhereDay(query *dbal.Query, where dbal.Where, bindingOffset *int) string

WhereDay Compile a "where day" 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.

func (SQLite3) WhereTime added in v0.5.1

func (grammarSQL SQLite3) WhereTime(query *dbal.Query, where dbal.Where, bindingOffset *int) string

WhereTime Compile a "where time" clause.

func (SQLite3) WhereYear added in v0.5.1

func (grammarSQL SQLite3) WhereYear(query *dbal.Query, where dbal.Where, bindingOffset *int) string

WhereYear Compile a "where year" clause.

Jump to

Keyboard shortcuts

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