Versions in this module Expand all Collapse all v1 v1.1.0 Jul 10, 2024 Changes in this version + var ErrConditionType = errors.New("Unsupported condition type") + var ErrNoColumnName = errors.New("no column name") + var ErrNoColumnsTobeUpdated = errors.New("no columns found to be updated") + var ErrNotImplemented = errors.New("Not implemented") + var ErrTableNotFound = errors.New("Table not found") + var ErrUnSupportedSQLType = errors.New("Unsupported sql type") + var ErrUnSupportedType = errors.New("Unsupported type error") + func IsIDConditionWithNoTableErr(err error) bool + type ErrIDConditionWithNoTable struct + ID schemas.PK + func (err ErrIDConditionWithNoTable) Error() string + type ErrInvalidIndexHintOperator struct + Op string + func (e ErrInvalidIndexHintOperator) Error() string + type ErrUnsupportedExprType struct + func (err ErrUnsupportedExprType) Error() string + type Expr struct + Arg interface{} + ColName string + func (expr *Expr) WriteArgs(w *builder.BytesWriter) error + type QuoteReplacer struct + func (q *QuoteReplacer) Write(p []byte) (n int, err error) + type Statement struct + AltTableName string + BufferSize int + Charset string + CheckVersion bool + ColumnMap columnMap + Context contexts.ContextCache + DecrColumns exprParams + ExprColumns exprParams + GroupByStr string + HavingStr string + IncrColumns exprParams + IsDistinct bool + IsForUpdate bool + LastError error + LimitN *int + MustColumnMap map[string]bool + NoAutoCondition bool + NullableMap map[string]bool + OmitColumnMap columnMap + RawParams []interface{} + RawSQL string + RefTable *schemas.Table + SelectStr string + Start int + StoreEngine string + TableAlias string + UseAutoJoin bool + UseAutoTime bool + UseCache bool + UseCascade bool + func NewStatement(dialect dialects.Dialect, tagParser *tags.Parser, ...) *Statement + func (statement *Statement) Alias(alias string) *Statement + func (statement *Statement) AllCols() *Statement + func (statement *Statement) And(query interface{}, args ...interface{}) *Statement + func (statement *Statement) Asc(colNames ...string) *Statement + func (statement *Statement) BuildConds(table *schemas.Table, bean interface{}, includeVersion bool, ...) (builder.Cond, error) + func (statement *Statement) BuildUpdates(tableValue reflect.Value, ...) ([]string, []interface{}, error) + func (statement *Statement) Cols(columns ...string) *Statement + func (statement *Statement) ColumnStr() string + func (statement *Statement) CondDeleted(col *schemas.Column) builder.Cond + func (statement *Statement) Conds() builder.Cond + func (statement *Statement) ConvertIDSQL(sqlStr string) string + func (statement *Statement) ConvertSQLOrArgs(sqlOrArgs ...interface{}) (string, []interface{}, error) + func (statement *Statement) ConvertUpdateSQL(sqlStr string) (string, string) + func (statement *Statement) Decr(column string, arg ...interface{}) *Statement + func (statement *Statement) Desc(colNames ...string) *Statement + func (statement *Statement) Distinct(columns ...string) *Statement + func (statement *Statement) ForUpdate() *Statement + func (statement *Statement) GenConditionsFromMap(m interface{}) ([]builder.Cond, error) + func (statement *Statement) GenCountSQL(beans ...interface{}) (string, []interface{}, error) + func (statement *Statement) GenDelIndexSQL() []string + func (statement *Statement) GenExistSQL(bean ...interface{}) (string, []interface{}, error) + func (statement *Statement) GenFindSQL(autoCond builder.Cond) (string, []interface{}, error) + func (statement *Statement) GenGetSQL(bean interface{}) (string, []interface{}, error) + func (statement *Statement) GenIndexSQL() []string + func (statement *Statement) GenInsertMapSQL(columns []string, args []interface{}) (string, []interface{}, error) + func (statement *Statement) GenInsertMultipleMapSQL(columns []string, argss [][]interface{}) (string, []interface{}, error) + func (statement *Statement) GenInsertSQL(colNames []string, args []interface{}) (string, []interface{}, error) + func (statement *Statement) GenQuerySQL(sqlOrArgs ...interface{}) (string, []interface{}, error) + func (statement *Statement) GenRawSQL() string + func (statement *Statement) GenSumSQL(bean interface{}, columns ...string) (string, []interface{}, error) + func (statement *Statement) GenUniqueSQL() []string + func (statement *Statement) GetUnscoped() bool + func (statement *Statement) GroupBy(keys string) *Statement + func (statement *Statement) HasOrderBy() bool + func (statement *Statement) Having(conditions string) *Statement + func (statement *Statement) ID(id interface{}) *Statement + func (statement *Statement) In(column string, args ...interface{}) *Statement + func (statement *Statement) Incr(column string, arg ...interface{}) *Statement + func (statement *Statement) IndexHint(op, forType, indexName string) error + func (statement *Statement) Join(joinOP string, joinTable interface{}, condition interface{}, ...) *Statement + func (statement *Statement) Limit(limit int, start ...int) *Statement + func (statement *Statement) MergeConds(bean interface{}) error + func (statement *Statement) MustCols(columns ...string) *Statement + func (statement *Statement) NeedTableName() bool + func (statement *Statement) NotIn(column string, args ...interface{}) *Statement + func (statement *Statement) Nullable(columns ...string) + func (statement *Statement) Omit(columns ...string) + func (statement *Statement) Or(query interface{}, args ...interface{}) *Statement + func (statement *Statement) OrderBy(order interface{}, args ...interface{}) *Statement + func (statement *Statement) ProcessIDParam() error + func (statement *Statement) QuoteReplacer(w *builder.BytesWriter) *QuoteReplacer + func (statement *Statement) ReplaceQuote(sql string) string + func (statement *Statement) Reset() + func (statement *Statement) ResetOrderBy() + func (statement *Statement) SQL(query interface{}, args ...interface{}) *Statement + func (statement *Statement) Select(str string) *Statement + func (statement *Statement) SetContextCache(ctxCache contexts.ContextCache) + func (statement *Statement) SetExpr(column string, expression interface{}) *Statement + func (statement *Statement) SetNoAutoCondition(no ...bool) *Statement + func (statement *Statement) SetRefBean(bean interface{}) error + func (statement *Statement) SetRefValue(v reflect.Value) error + func (statement *Statement) SetTable(tableNameOrBean interface{}) error + func (statement *Statement) SetTableName(tableName string) + func (statement *Statement) SetUnscoped() *Statement + func (statement *Statement) TableName() string + func (statement *Statement) Top(limit int) *Statement + func (statement *Statement) UseBool(columns ...string) *Statement + func (statement *Statement) Value2Interface(col *schemas.Column, fieldValue reflect.Value) (interface{}, error) + func (statement *Statement) Where(query interface{}, args ...interface{}) *Statement + func (statement *Statement) WriteArg(w *builder.BytesWriter, arg interface{}) error + func (statement *Statement) WriteArgs(w *builder.BytesWriter, args []interface{}) error + func (statement *Statement) WriteDelete(realSQLWriter, deleteSQLWriter *builder.BytesWriter, ...) error + func (statement *Statement) WriteInsertMultiple(w *builder.BytesWriter, tableName string, colNames []string, ...) error + func (statement *Statement) WriteUpdate(updateWriter *builder.BytesWriter, cond builder.Cond, v reflect.Value, ...) error