postgres

package
v0.0.0-...-60a21d4 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() dbal.Grammar

Types

type Postgres

type Postgres struct {
	sql.SQL
}

func (Postgres) AlterTable

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

func (Postgres) CompileColumns

func (grammarSQL Postgres) CompileColumns(query *dbal.Query, columns []interface{}, bindingOffset *int) string

func (Postgres) CompileDelete

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

func (Postgres) CompileInsertGetID

func (grammarSQL Postgres) CompileInsertGetID(query *dbal.Query, columns []interface{}, values [][]interface{}, sequence string) (string, []interface{})

func (Postgres) CompileInsertOrIgnore

func (grammarSQL Postgres) CompileInsertOrIgnore(query *dbal.Query, columns []interface{}, values [][]interface{}) (string, []interface{})

func (Postgres) CompileLock

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

func (Postgres) CompileSelect

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

func (Postgres) CompileSelectOffset

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

func (Postgres) CompileTruncate

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

func (Postgres) CompileUpdate

func (grammarSQL Postgres) CompileUpdate(query *dbal.Query, values map[string]interface{}) (string, []interface{})

func (Postgres) CompileUpsert

func (grammarSQL Postgres) CompileUpsert(query *dbal.Query, columns []interface{}, values [][]interface{}, uniqueBy []interface{}, updateValues interface{}) (string, []interface{})

func (Postgres) CompileWheres

func (grammarSQL Postgres) CompileWheres(query *dbal.Query, wheres []dbal.Where, bindingOffset *int) string

func (Postgres) CreateTable

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

func (Postgres) CreateType

func (grammarSQL Postgres) CreateType(table *dbal.Table, types map[string][]string) error

func (Postgres) ExecSQL

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

func (Postgres) GetColumnListing

func (grammarSQL Postgres) GetColumnListing(dbName string, tableName string) ([]*dbal.Column, error)

func (Postgres) GetIndexListing

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

func (Postgres) GetOperators

func (grammarSQL Postgres) GetOperators() []string

func (Postgres) GetTable

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

func (Postgres) GetTables

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

func (Postgres) GetVersion

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

func (Postgres) NewWith

func (grammarSQL Postgres) NewWith(db *sqlx.DB, config *dbal.Config, option *dbal.Option) (dbal.Grammar, error)

func (Postgres) NewWithRead

func (grammarSQL Postgres) NewWithRead(write *sqlx.DB, writeConfig *dbal.Config, read *sqlx.DB, readConfig *dbal.Config, option *dbal.Option) (dbal.Grammar, error)

func (Postgres) ProcessInsertGetID

func (grammarSQL Postgres) ProcessInsertGetID(sql string, bindings []interface{}, sequence string) (int64, error)

func (Postgres) RenameTable

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

func (Postgres) SQLAddColumn

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

func (Postgres) SQLAddComment

func (grammarSQL Postgres) SQLAddComment(column *dbal.Column) string

func (Postgres) SQLAddIndex

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

func (Postgres) SQLAddPrimary

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

func (Postgres) SQLAlterColumnType

func (grammarSQL Postgres) SQLAlterColumnType(Column *dbal.Column) string

func (Postgres) SQLAlterIndex

func (grammarSQL Postgres) SQLAlterIndex(index *dbal.Index) string

func (Postgres) TableExists

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

func (Postgres) Upsert

func (grammarSQL Postgres) Upsert(query *dbal.Query, values []orm.R, uniqueBy []interface{}, updateValues interface{}) (sql.Result, error)

func (Postgres) WhereDate

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

func (Postgres) WhereDateBased

func (grammarSQL Postgres) WhereDateBased(typ string, query *dbal.Query, where dbal.Where, bindingOffset *int) string

func (Postgres) WhereDay

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

func (Postgres) WhereMonth

func (grammarSQL Postgres) WhereMonth(query *dbal.Query, where dbal.Where, bindingOffset *int) string

func (Postgres) WhereTime

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

func (Postgres) WhereYear

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

type Quoter

type Quoter struct {
	sql.Quoter
}

func (*Quoter) Columnize

func (quoter *Quoter) Columnize(columns []interface{}) string

func (Quoter) ID

func (quoter Quoter) ID(name string) string

func (*Quoter) Parameter

func (quoter *Quoter) Parameter(value interface{}, num int) string

func (*Quoter) Parameterize

func (quoter *Quoter) Parameterize(values []interface{}, offset int) string

func (Quoter) VAL

func (quoter Quoter) VAL(v interface{}) string

func (*Quoter) Wrap

func (quoter *Quoter) Wrap(value interface{}) string

func (*Quoter) WrapAliasedValue

func (quoter *Quoter) WrapAliasedValue(value string) string

func (*Quoter) WrapTable

func (quoter *Quoter) WrapTable(value interface{}) string

Jump to

Keyboard shortcuts

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