# Functions
AddConfigNode adds one node configuration to configuration of given group.
AddDefaultConfigGroup adds multiple node configurations to configuration of default group.
AddDefaultConfigNode adds one node configuration to configuration of default group.
CatchSQL catches and returns all sql statements that are EXECUTED in given closure function.
DBFromCtx retrieves and returns DB object from context.
DefaultTxOptions returns the default transaction options.
FormatMultiLineSqlToSingle formats sql template string into one line.
FormatSqlWithArgs binds the arguments to the sql string and returns a complete sql string, just for debugging.
GetConfig retrieves and returns the configuration of given group.
GetDefaultGroup returns the { name of default configuration.
GetInsertOperationByOption returns proper insert option with given parameter `option`.
GetPrimaryKeyCondition returns a new where condition by primary field name.
Instance returns an instance for DB operations.
IsConfigured checks and returns whether the database configured.
ListItemValues retrieves and returns the elements of all item struct/map with key `key`.
ListItemValuesUnique retrieves and returns the unique elements of all struct/map with key `key`.
MapOrStructToMapDeep converts `value` to map type recursively(if attribute struct is embedded).
New creates and returns an ORM object with given configuration node.
NewByGroup creates and returns an ORM object with global configurations.
Register registers custom database driver to gdb.
SetConfig sets the global configuration for package.
SetConfigGroup sets the configuration for given group.
SetDefaultGroup sets the group name for default configuration.
ToSQL formats and returns the last one of sql statements in given closure function WITHOUT TRULY EXECUTING IT.
TXFromCtx retrieves and returns transaction object from context.
WithDB injects given db object into context and returns a new context.
WithoutTX removed transaction object from context and returns a new context.
WithTX injects given transaction object into context and returns a new context.
# Constants
Default group name.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
PropagationMandatory executes in a transaction, fails if no existing transaction.
PropagationNested starts a nested transaction if already in a transaction, or behaves like PropagationRequired if not in a transaction.
PropagationNever executes non-transactional, fails if in an existing transaction.
PropagationNotSupported executes non-transactional, suspends any existing transaction.
REQUIRED.
PropagationRequiresNew starts a new transaction, and suspends the current transaction if one exists.
PropagationSupports executes within the existing transaction if present, otherwise executes without transaction.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
(Default)Auto detect the field type by table field type.
Using datetime as the field value.
In unix seconds.
In unix microseconds.
In unix milliseconds.
In unix nanoseconds.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Structs
CacheOption is options for model cache control in query.
No description provided by the author
ConfigNode is configuration for one node.
Core is the base struct for database management.
Counter is the type for update count.
DefaultShardingRule implements a simple modulo-based sharding rule.
DoCommitInput is the input parameters for function DoCommit.
DoCommitOutput is the output parameters for function DoCommit.
DoInsertOption is the input struct for function DoInsert.
DriverDefault is the default driver for mysql database, which does nothing.
DriverWrapper is a driver wrapper for extending features with embedded driver.
DriverWrapperDB is a DB wrapper for extending features with embedded DB.
HookDeleteInput holds the parameters for delete hook operation.
HookHandler manages all supported hook functions for Model.
HookInsertInput holds the parameters for insert hook operation.
HookSelectInput holds the parameters for select hook operation.
HookUpdateInput holds the parameters for update hook operation.
Model is core struct implementing the DAO for ORM.
Schema is a schema object from which it can then create a Model.
ShardingConfig defines the configuration for database/table sharding.
ShardingSchemaConfig defines the configuration for database sharding.
ShardingTableConfig defines the configuration for table sharding.
SoftTimeOption is the option to customize soft time feature for Model.
Sql is the sql recording struct.
SqlResult is execution result for sql operations.
Stmt is a prepared statement.
TableField is the struct for table field.
TXCore is the struct for transaction management.
TxOptions defines options for transaction control.
WhereBuilder holds multiple where conditions in a group.
WhereHolder is the holder for where condition preparing.
# Interfaces
DB defines the interfaces for ORM operations.
Driver is the interface for integrating sql drivers into package gdb.
Link is a common database function wrapper interface.
ShardingRule defines the interface for sharding rules.
StatsItem defines the stats information for a configuration node.
TX defines the interfaces for ORM transaction operations.
# Type aliases
ChunkHandler is a function that is used in function Chunk, which handles given Result and error.
Config is the configuration management object.
ConfigGroup is a slice of configuration node for specified named group.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ModelHandler is a function that handles given Model and returns a new Model that is custom modified.
Propagation defines transaction propagation behavior.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
SoftTimeType custom defines the soft time field type.
No description provided by the author