package
0.0.0-20241029124736-0866f7f054e7
Repository: https://github.com/module-repo/go-xorm.git
Documentation: pkg.go.dev
# Functions
And generates AND conditions.
ConvertPlaceholder replaces ? to $1, $2 ..
ConvertToBoundSQL will convert SQL and args to a bound SQL.
Delete creates a delete Builder.
Dialect sets the db dialect of Builder.
Expr generate customerize SQL.
If returns Cond via condition.
In generates IN condition.
Insert creates an insert Builder.
MsSQL is shortcut of Dialect(MsSQL).
MySQL is shortcut of Dialect(MySQL).
NewCond creates an empty condition.
NewWriter creates a new string writer.
NotIn generate NOT IN condition.
Or sets OR conditions.
Oracle is shortcut of Dialect(Oracle).
Postgres is shortcut of Dialect(Postgres).
Select creates a select Builder.
SQLite is shortcut of Dialect(SQLITE).
ToBoundSQL convert a builder or conditions to parameters bound SQL.
ToSQL convert a builder or conditions to SQL and args.
Update creates an update Builder.
WriteMap writes conditions' SQL to Writer, op could be =, <>, >, <, <=, >= and etc.
# Variables
ErrDialectNotSetUp dialect is not setup yet.
ErrInconsistentDialect Inconsistent dialect in same builder.
ErrInvalidLimitation offset or limit is not correct.
ErrNeedMoreArguments need more arguments.
ErrNoColumnToInsert no column to insert.
ErrNoColumnToUpdate no column to update.
ErrNoInConditions no IN params error.
ErrNoNotInConditions no NOT IN params error.
ErrNoTableName no table name.
ErrNotSupportDialectType not supported dialect type error.
ErrNotSupportType not supported SQL type error.
ErrNotUnexpectedUnionConditions using union in a wrong way.
ErrUnexpectedSubQuery Unexpected sub-query in SELECT query.
ErrUnnamedDerivedTable Every derived table must have its own alias.
ErrUnsupportedUnionMembers unexpected members in UNION query.
# Structs
Between implmentes between condition.
Builder describes a SQL statement.
BytesWriter implments Writer and save SQL in bytes.Buffer.
# Interfaces
Cond defines an interface.
UpdateCond defines an interface that cond could be used with update.
Writer defines the interface.
# Type aliases
Decr implements a type used by Eq.
Eq defines equals conditions.
Gt defines > condition.
Gte defines >= condition.
Incr implements a type used by Eq.
IsNull defines IS NULL condition.
Like defines like condition.
Lt defines < condition.
Lte defines <= condition.
Neq defines not equal conditions.
Not defines NOT condition.
NotNull defines NOT NULL condition.