Documentation ¶
Index ¶
- Variables
- func LiteralToSQLOperand(literal interface{}) (string, []interface{})
- func NewExpressionSqlizer(alias string, fieldType skydb.FieldType, expr skydb.Expression) sq.Sqlizer
- func RequireCast(sqlizer sq.Sqlizer) (sq.Sqlizer, error)
- func SortOrderBySQL(alias string, sort skydb.Sort) (string, error)
- type FalseSqlizer
- type NotSqlizer
- type PredicateSqlizerFactory
- type UpsertQueryBuilder
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrCannotCompareUsingInOperator = errors.New(`cannot use "in" operator to compare the specified values`)
Functions ¶
func LiteralToSQLOperand ¶
func LiteralToSQLOperand(literal interface{}) (string, []interface{})
func NewExpressionSqlizer ¶
Types ¶
type FalseSqlizer ¶
type FalseSqlizer struct { }
FalseSqlizer generates SQL condition that evaluates to false
func (FalseSqlizer) ToSql ¶
func (s FalseSqlizer) ToSql() (sql string, args []interface{}, err error)
ToSql generates SQL for FalseSqlizer
type NotSqlizer ¶
NotSqlizer generates SQL condition that negates a boolean condition
func (NotSqlizer) ToSql ¶
func (s NotSqlizer) ToSql() (sql string, args []interface{}, err error)
ToSql generates SQL for NotSqlizer
type PredicateSqlizerFactory ¶
type PredicateSqlizerFactory interface { UpdateTypemap(typemap skydb.RecordSchema) skydb.RecordSchema AddJoinsToSelectBuilder(q sq.SelectBuilder) sq.SelectBuilder NewPredicateSqlizer(p skydb.Predicate) (sq.Sqlizer, error) NewAccessControlSqlizer(user *skydb.AuthInfo, aclLevel skydb.RecordACLLevel) (sq.Sqlizer, error) }
func NewPredicateSqlizerFactory ¶
func NewPredicateSqlizerFactory(db skydb.Database, primaryTable string) PredicateSqlizerFactory
type UpsertQueryBuilder ¶
type UpsertQueryBuilder struct {
// contains filtered or unexported fields
}
UpsertQueryBuilder is a sqlizer for INSERT ON CONFLICT UPDATE SQL.
func UpsertQuery ¶
func UpsertQuery(table string, pkData, data map[string]interface{}) *UpsertQueryBuilder
UpsertQuery creates a new UpsertQueryBuilder.
func UpsertQueryWithWrappers ¶
func (*UpsertQueryBuilder) IgnoreKeyOnUpdate ¶
func (upsert *UpsertQueryBuilder) IgnoreKeyOnUpdate(col string) *UpsertQueryBuilder
func (*UpsertQueryBuilder) SelectColumn ¶
func (upsert *UpsertQueryBuilder) SelectColumn(col string, sqlizer sq.Sqlizer) *UpsertQueryBuilder
func (*UpsertQueryBuilder) ToSql ¶
func (upsert *UpsertQueryBuilder) ToSql() (sql string, args []interface{}, err error)
Click to show internal directories.
Click to hide internal directories.