Documentation ¶
Index ¶
- func NewDialect() qb.Dialect
- type Dialect
- func (d *Dialect) AutoIncrement(column *qb.ColumnElem) string
- func (d *Dialect) CompileType(t qb.TypeElem) string
- func (d *Dialect) Driver() string
- func (d *Dialect) Escape(str string) string
- func (d *Dialect) EscapeAll(strings []string) []string
- func (d *Dialect) Escaping() bool
- func (d *Dialect) GetCompiler() qb.Compiler
- func (d *Dialect) SetEscaping(escaping bool)
- func (d *Dialect) SupportsUnsigned() bool
- func (d *Dialect) WrapError(err error) (qbErr qb.Error)
- type PostgresCompiler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Dialect ¶
type Dialect struct {
// contains filtered or unexported fields
}
Dialect is a type of dialect that can be used with postgres driver
func (*Dialect) AutoIncrement ¶
func (d *Dialect) AutoIncrement(column *qb.ColumnElem) string
AutoIncrement generates auto increment sql of current dialect
func (*Dialect) CompileType ¶
CompileType compiles a type into its DDL
func (*Dialect) GetCompiler ¶
GetCompiler returns a PostgresCompiler
func (*Dialect) SetEscaping ¶
SetEscaping sets the escaping parameter of dialect
func (*Dialect) SupportsUnsigned ¶
SupportsUnsigned returns whether driver supports unsigned type mappings or not
type PostgresCompiler ¶
type PostgresCompiler struct {
qb.SQLCompiler
}
PostgresCompiler is a SQLCompiler specialised for PostgreSQL
func (PostgresCompiler) VisitBind ¶
func (PostgresCompiler) VisitBind(context *qb.CompilerContext, bind qb.BindClause) string
VisitBind renders a bounded value
func (PostgresCompiler) VisitUpsert ¶
func (PostgresCompiler) VisitUpsert(context *qb.CompilerContext, upsert qb.UpsertStmt) string
VisitUpsert generates INSERT INTO ... VALUES ... ON CONFLICT(...) DO UPDATE SET ...
Click to show internal directories.
Click to hide internal directories.