Categorygithub.com/wlhet/orm
modulepackage
0.0.2
Repository: https://github.com/wlhet/orm.git
Documentation: pkg.go.dev

# README

copy from github/astxie/beeog/orm tag v0.0.1

# Functions

AddAliasWthDB add a aliasName for the drivename.
BootStrap bootstrap models.
ColValue do the field raw changes.
GetDB Get *sql.DB from registered database by db alias name.
NewCondition return new condition struct.
NewLog set io.Writer to create a Logger.
NewOrm create new orm.
NewOrmWithDB create a new ormer object with specify *sql.DB for query.
NewQueryBuilder return the QueryBuilder.
RegisterDataBase Setting the database connect params.
RegisterDriver Register a database driver use specify driver name, this can be definition the driver is which database type.
RegisterModel register models.
RegisterModelWithPrefix register models with a prefix.
RegisterModelWithSuffix register models with a suffix.
ResetModelCache Clean model cache.
RunCommand listen for orm command and then run it if command arguments passed.
RunSyncdb run syncdb command line.
SetDataBaseTZ Change the database default used timezone.
SetMaxIdleConns Change the max idle conns for *sql.DB, use specify database alias name.
SetMaxOpenConns Change the max open conns for *sql.DB, use specify database alias name.
SetNameStrategy set different name strategy.
ToInt64 interface to int64.
ToStr interface to string.

# Constants

define Col operations.
define Col operations.
define Col operations.
define Col operations.
define Col operations.
define Col operations.
define Col operations.
define Col operations.
define Col operations.
CommaSpace is the separation.
DebugQueries define the debug.
mysql.
oracle.
pgsql.
sqlite.
TiDB.
ExprSep define the expression separation.
Define some logic enum.
Define some logic enum.
Define some logic enum.
Define some logic enum.
Define the Type enum.
Define the Type enum.
Define the Type enum.
Define the Type enum.
Define the Type enum.
Define the Type enum.
Define the Type enum.
Define the Type enum.
Define the Type enum.
Define the Type enum.
Define the Type enum.
Define the Type enum.
Define the Type enum.
Define the Type enum.
Define the Type enum.
Define the Type enum.
Define the Type enum.
Define the Type enum.
Define the Type enum.
Define the Type enum.
Define the Type enum.
Define the Type enum.
Define the Type enum.
Define the Type enum.

# Variables

Define common vars.
Define common vars.
Define common vars.
Define common vars.
Define common vars.
Define common vars.
ErrMissPK missing pk error.
Define common vars.
Define common vars.
Define common vars.
Define common vars.
Define common vars.
Define common vars.
costomer log func.
No description provided by the author

# Structs

Condition struct.
No description provided by the author
Log implement the log.Logger.
MySQLQueryBuilder is the SQL build.
TiDBQueryBuilder is the SQL build.

# Interfaces

Driver define database driver.
Fielder define field info.
Inserter insert prepared statement.
Ormer define the orm interface.
QueryBuilder is the Query builder interface.
QueryM2Mer model to model query struct all operations are on the m2m table only, will not affect the origin model table.
QuerySeter query seter.
RawPreparer raw query statement.
RawSeter raw query seter create From Ormer.Raw for example: sql := fmt.Sprintf("SELECT %sid%s,%sname%s FROM %suser%s WHERE id = ?",Q,Q,Q,Q,Q,Q) rs := Ormer.Raw(sql, 1).

# Type aliases

BigIntegerField -9223372036854775808 to 9223372036854775807.
BooleanField A true/false field.
CharField A string field required values tag: size The size is enforced at the database level and in models’s validation.
DateField A date, represented in go by a time.Time instance.
DateTimeField A date, represented in go by a time.Time instance.
DriverType database driver constant int.
FloatField A floating-point number represented in go by a float32 value.
IntegerField -2147483648 to 2147483647.
JsonbField postgres json field.
JSONField postgres json field.
Params stores the Params.
ParamsList stores paramslist.
PositiveBigIntegerField 0 to 18446744073709551615.
PositiveIntegerField 0 to 4294967295.
PositiveSmallIntegerField 0 to 65535.
SmallIntegerField -32768 to 32767.
StrTo is the target string.
TextField A large text field.
TimeField A time, represented in go by a time.Time instance.