Versions in this module Expand all Collapse all v1 v1.3.5 Sep 17, 2023 v1.3.4 Sep 15, 2023 Changes in this version + const ARRAY_TYPE + const BLOB_TYPE + const BOOL_TYPE + const IndexType + const NUMERIC_TYPE + const ONLYFROMDB + const ONLYTODB + const TEXT_TYPE + const TIME_TYPE + const TWOSIDES + const UNKNOW_TYPE + const UniqueType + var AlwaysNoReserve = func(string) bool + var AlwaysReserve = func(string) bool + var Array = "ARRAY" + var BigFloatType = reflect.TypeOf((*big.Float)(nil)).Elem() + var BigInt = "BIGINT" + var BigSerial = "BIGSERIAL" + var Binary = "BINARY" + var Bit = "BIT" + var Blob = "BLOB" + var Bool = "BOOL" + var BoolType = reflect.TypeOf((*bool)(nil)).Elem() + var Boolean = "BOOLEAN" + var ByteType = reflect.TypeOf((*byte)(nil)).Elem() + var Bytea = "BYTEA" + var BytesType = reflect.SliceOf(ByteType) + var Char = "CHAR" + var Clob = "CLOB" + var CommanQuoteMark byte = '`' + var CommonQuoter = Quoter + var Complex128Type = reflect.TypeOf((*complex128)(nil)).Elem() + var Complex64Type = reflect.TypeOf((*complex64)(nil)).Elem() + var Date = "DATE" + var DateTime = "DATETIME" + var Decimal = "DECIMAL" + var Double = "DOUBLE" + var Enum = "ENUM" + var Float = "FLOAT" + var Float32Type = reflect.TypeOf((*float32)(nil)).Elem() + var Float64Type = reflect.TypeOf((*float64)(nil)).Elem() + var Int = "INT" + var Int16Type = reflect.TypeOf((*int16)(nil)).Elem() + var Int32Type = reflect.TypeOf((*int32)(nil)).Elem() + var Int64Type = reflect.TypeOf((*int64)(nil)).Elem() + var Int8Type = reflect.TypeOf((*int8)(nil)).Elem() + var IntType = reflect.TypeOf((*int)(nil)).Elem() + var Integer = "INTEGER" + var Json = "JSON" + var Jsonb = "JSONB" + var LongBlob = "LONGBLOB" + var LongText = "LONGTEXT" + var MediumBlob = "MEDIUMBLOB" + var MediumInt = "MEDIUMINT" + var MediumText = "MEDIUMTEXT" + var Money = "MONEY" + var NChar = "NCHAR" + var NText = "NTEXT" + var NVarchar = "NVARCHAR" + var NullBoolType = reflect.TypeOf((*sql.NullBool)(nil)).Elem() + var NullFloat64Type = reflect.TypeOf((*sql.NullFloat64)(nil)).Elem() + var NullInt32Type = reflect.TypeOf((*sql.NullInt32)(nil)).Elem() + var NullInt64Type = reflect.TypeOf((*sql.NullInt64)(nil)).Elem() + var NullStringType = reflect.TypeOf((*sql.NullString)(nil)).Elem() + var Number = "NUMBER" + var Numeric = "NUMERIC" + var Real = "REAL" + var Serial = "SERIAL" + var Set = "SET" + var SmallDateTime = "SMALLDATETIME" + var SmallInt = "SMALLINT" + var SmallMoney = "SMALLMONEY" + var SqlTypes = map[string]int + var StringType = reflect.TypeOf((*string)(nil)).Elem() + var SysName = "SYSNAME" + var Text = "TEXT" + var Time = "TIME" + var TimeStamp = "TIMESTAMP" + var TimeStampz = "TIMESTAMPZ" + var TimeType = reflect.TypeOf((*time.Time)(nil)).Elem() + var TinyBlob = "TINYBLOB" + var TinyInt = "TINYINT" + var TinyText = "TINYTEXT" + var Uint16Type = reflect.TypeOf((*uint16)(nil)).Elem() + var Uint32Type = reflect.TypeOf((*uint32)(nil)).Elem() + var Uint64Type = reflect.TypeOf((*uint64)(nil)).Elem() + var Uint8Type = reflect.TypeOf((*uint8)(nil)).Elem() + var UintType = reflect.TypeOf((*uint)(nil)).Elem() + var UniqueIdentifier = "UNIQUEIDENTIFIER" + var UnsignedBigInt = "UNSIGNED BIGINT" + var UnsignedBit = "UNSIGNED BIT" + var UnsignedInt = "UNSIGNED INT" + var UnsignedMediumInt = "UNSIGNED MEDIUMINT" + var UnsignedSmallInt = "UNSIGNED SMALLINT" + var UnsignedTinyInt = "UNSIGNED TINYINT" + var Uuid = "UUID" + var VARCHAR2 = "VARCHAR2" + var VarBinary = "VARBINARY" + var Varchar = "VARCHAR" + var XML = "XML" + var Year = "YEAR" + func SQLType2Type(st SQLType) reflect.Type + func SQLTypeName(tp string) string + type Collation struct + Column string + Name string + type Column struct + Collation string + Comment string + Default string + DefaultIsEmpty bool + DisableTimeZone bool + EnumOptions map[string]int + FieldIndex []int + FieldName string + Indexes map[string]int + IsAutoIncrement bool + IsCascade bool + IsCreated bool + IsDeleted bool + IsJSON bool + IsPrimaryKey bool + IsUpdated bool + IsVersion bool + Length int64 + Length2 int64 + MapType int + Name string + Nullable bool + SQLType SQLType + SetOptions map[string]int + TableName string + TimeZone *time.Location + func NewColumn(name, fieldName string, sqlType SQLType, len1, len2 int64, nullable bool) *Column + func (col *Column) ConvertID(sid string) (interface{}, error) + func (col *Column) ValueOf(bean interface{}) (*reflect.Value, error) + func (col *Column) ValueOfV(dataStruct *reflect.Value) (*reflect.Value, error) + type DBType string + const DAMENG + const MSSQL + const MYSQL + const ORACLE + const POSTGRES + const SQLITE + type Index struct + Cols []string + IsRegular bool + Name string + Type int + func NewIndex(name string, indexType int) *Index + func (index *Index) AddColumn(cols ...string) + func (index *Index) Equal(dst *Index) bool + func (index *Index) XName(tableName string) string + type PK []interface + func (p *PK) FromString(content string) error + func (p *PK) IsZero() bool + func (p *PK) ToString() (string, error) + func NewPK(pks ...interface{}) *PK + type Quoter struct + IsReserved func(string) bool + Prefix byte + Suffix byte + func (q Quoter) IsEmpty() bool + func (q Quoter) Join(a []string, sep string) string + func (q Quoter) JoinWrite(b *strings.Builder, a []string, sep string) error + func (q Quoter) Quote(s string) string + func (q Quoter) QuoteTo(buf *strings.Builder, value string) error + func (q Quoter) Replace(sql string) string + func (q Quoter) Strings(s []string) []string + func (q Quoter) Trim(s string) string + type SQLType struct + DefaultLength int64 + DefaultLength2 int64 + Name string + func Type2SQLType(t reflect.Type) (st SQLType) + func (s *SQLType) IsArray() bool + func (s *SQLType) IsBlob() bool + func (s *SQLType) IsBool() bool + func (s *SQLType) IsJson() bool + func (s *SQLType) IsNumeric() bool + func (s *SQLType) IsText() bool + func (s *SQLType) IsTime() bool + func (s *SQLType) IsType(st int) bool + func (s *SQLType) IsXML() bool + type Table struct + AutoIncrement string + Charset string + Collation string + Comment string + Created map[string]bool + Deleted string + Indexes map[string]*Index + Name string + PrimaryKeys []string + StoreEngine string + Type reflect.Type + Updated string + Version string + func NewEmptyTable() *Table + func NewTable(name string, t reflect.Type) *Table + func (table *Table) AddColumn(col *Column) + func (table *Table) AddIndex(index *Index) + func (table *Table) AutoIncrColumn() *Column + func (table *Table) ColumnType(name string) reflect.Type + func (table *Table) Columns() []*Column + func (table *Table) ColumnsSeq() []string + func (table *Table) DeletedColumn() *Column + func (table *Table) GetColumn(name string) *Column + func (table *Table) GetColumnIdx(name string, idx int) *Column + func (table *Table) IDOfV(rv reflect.Value) (PK, error) + func (table *Table) PKColumns() []*Column + func (table *Table) UpdatedColumn() *Column + func (table *Table) VersionColumn() *Column + type Version struct + Edition string + Level string + Number string