# Functions
BuildCaseInsensitiveIn returns a condition to check if the given value is in the given values case-insensitively.
BuildCaseInsensitiveLike returns a condition to check if the given value is like the given key case-insensitively.
BuilderDialect returns the xorm.Builder dialect of the engine.
Cell2Int64 converts a xorm.Cell type to int64, and handles possible irregular cases.
ConvertDatabaseTable converts database and tables from utf8 to utf8mb4 if it's mysql and set ROW_FORMAT=dynamic.
ConvertVarcharToNVarchar converts database and tables from varchar to nvarchar if it's mssql.
Count represents a common count function which accept an options interface.
CountBadSequences looks for broken sequences from recreate-table mistakes.
CountByBean counts the number of database records according non-empty fields of the bean as conditions.
CountOrphanedObjects count subjects with have no existing refobject anymore.
DecrByIDs decreases the given column for entities of the "bean" type with one of the given ids by one Timestamps of the entities won't be updated.
DeleteAllRecords will delete all the records of this table.
DeleteBeans deletes all given beans, beans must contain delete conditions.
DeleteByBean deletes all records according non-empty fields of the bean as conditions.
DeleteByID deletes the given bean with the given ID.
DeleteOrphanedObjects delete subjects with have no existing refobject anymore.
DeleteResourceIndex delete resource index.
DumpDatabase dumps all data from database according the special database SQL syntax to file system.
DumpTables dump tables information.
ErrCancelledf returns an ErrCancelled for the provided format and args.
Exec executes a sql with args.
Find represents a common find function which accept an options interface.
FindAndCount represents a common findandcount function which accept an options interface.
FindIDs finds the IDs for the given table name satisfying the given condition By passing a different value than "id" for "idCol", you can query for foreign IDs, i.e.
FixBadSequences fixes for broken sequences from recreate-table mistakes.
GetEngine gets an existing db Engine/Statement or creates a new Session.
GetMaxID will return max id of the table.
GetNextResourceIndex generates a resource index, it must run in the same transaction where the resource is created.
InitEngine initializes the xorm.Engine and sets it as db.DefaultContext.
InitEngineWithMigration initializes a new xorm.Engine and sets it as the db.DefaultContext This function must never call .Sync() if the provided migration function fails.
Insert inserts records into database.
InTransaction returns true if the engine is in a transaction otherwise return false.
IsErrCancelled checks if an error is a ErrCancelled.
IsErrNameCharsNotAllowed checks if an error is an ErrNameCharsNotAllowed.
IsErrNamePatternNotAllowed checks if an error is an ErrNamePatternNotAllowed.
IsErrNameReserved checks if an error is a ErrNameReserved.
IsErrNotExist checks if an error is an ErrNotExist.
IsErrSSHDisabled checks if an error is a ErrSSHDisabled.
IsTableNotEmpty returns true if table has at least one record.
IsUsableName checks if name is reserved or pattern of name is not allowed based on given reserved names and patterns.
Iterate iterates all the Bean object.
MaxBatchInsertSize returns the table's max batch insert size.
NamesToBean return a list of beans or an error.
NewAbsoluteListOptions creates a list option with applied limits.
NewXORMLogger inits a log bridge for xorm.
RegisterModel registers model, if initfunc provided, it will be invoked after data model sync.
SetDefaultEngine sets the default engine for db.
SetSessionPagination sets pagination for a database session.
SyncAllTables sync the schemas of all tables, is required by unit test code.
SyncMaxResourceIndex sync the max index with the resource.
TableInfo returns table's information via an object.
TableName returns the table name according a bean object.
TruncateBeans deletes all given beans, beans may contain delete conditions.
TxContext represents a transaction Context, it will reuse the existing transaction in the parent context or create a new one.
UnsetDefaultEngine closes and unsets the default engine We hope the SetDefaultEngine and UnsetDefaultEngine can be paired, but it's impossible now, there are many calls to InitEngine -> SetDefaultEngine directly to overwrite the `x` and DefaultContext without close Global database engine related functions are all racy and there is no graceful close right now.
WithTx represents executing database operations on a transaction, if the transaction exist, this function will reuse it otherwise will create a new one and close it when finished.
# Constants
DefaultMaxInSize represents default variables number on IN () in SQL.
NoConditionID means a condition to filter the records which don't match any id.
NonExistingID means a condition to match no result (eg: a non-existing user) It doesn't use -1 or -2 because they are used as builtin users.
Strings for sorting result.
Strings for sorting result.
Strings for sorting result.
Strings for sorting result.
Strings for sorting result.
Strings for sorting result.
Strings for sorting result.
Strings for sorting result.
Strings for sorting result.
Strings for sorting result.
Strings for sorting result.
Strings for sorting result.
# Variables
AlphaDashDotPattern characters prohibited in a user name (anything except A-Za-z0-9_.-).
DefaultContext is the default context to run xorm queries in will be overwritten by Init with HammerContext.
ErrGetResourceIndexFailed represents an error when resource index retries 3 times.
ErrNameEmpty name is empty error.
ErrResouceOutdated represents an error when request resource outdated.
# Structs
AbsoluteListOptions absolute options to paginate results.
Context represents a db context.
ErrCancelled represents an error due to context cancellation.
ErrNameCharsNotAllowed represents a "character not allowed in name" error.
ErrNamePatternNotAllowed represents a "pattern not allowed" error.
ErrNameReserved represents a "reserved name" error.
ErrNotExist represents a non-exist error.
ErrSSHDisabled represents an "SSH disabled" error.
ListOptions options to paginate results.
ResourceIndex represents a resource index which could be used as issue/release and others We can create different tables i.e.
XORMLogBridge a logger bridge from Logger to xorm.
# Interfaces
Committer represents an interface to Commit or Close the Context.
Engine represents a xorm engine or session.
FindOptions represents a find options.
Paginator is the base for different ListOptions types.