Documentation ¶
Index ¶
- Variables
- func Register(driver string, parser IDriver)
- func ToCamelCase(s string, isUcFirst ...bool) string
- func ToSnakeCase(s string) string
- type Charsets
- type Column
- func (c *Column) AutoIncrement(b ...bool) *Column
- func (c *Column) Charset(charset string) *Column
- func (c *Column) Collate(collate string) *Column
- func (c *Column) Comment(comment string) *Column
- func (c *Column) Default(value any) *Column
- func (c *Column) Enable(db *Table)
- func (c *Column) Fulltext() *Column
- func (c *Column) Index() *Column
- func (c *Column) Nullable(b ...bool) *Column
- func (c *Column) Primary() *Column
- func (c *Column) ToStruct() string
- func (c *Column) Unique() *Column
- func (c *Column) Unsigned() *Column
- type DBM
- func (db *DBM) Migrate(driver, dsn string)
- func (db *DBM) SetPackageName(pack string) *DBM
- func (db *DBM) ToJson(driver string)
- func (db *DBM) ToSql(driver string)
- func (db *DBM) ToStructToPath(filePath, driver string, tags ...*TagOption)
- func (db *DBM) ToStructToSingleFile(filename, driver string, tags ...*TagOption)
- func (db *DBM) TryToStructToSingleFile(filename, driver string, tags ...*TagOption)
- type DBSource
- type Field
- type IDriver
- type IScheme
- type KeyType
- type Keys
- type Mysql
- type Sql
- type Table
- func (db *Table) Alter(args ...IScheme) *DBM
- func (db *Table) Charset(charset string) *Table
- func (db *Table) Collate(collate string) *Table
- func (db *Table) Comment(arg string) *Table
- func (db *Table) Create(args ...IScheme) *Table
- func (db *Table) Drop(args ...IScheme) *DBM
- func (db *Table) Engine(arg string) *Table
- func (db *Table) ToSql(driver string)
- func (db *Table) ToStruct(driver string, tags ...*TagOption) string
- type Tables
- type TagOption
Constants ¶
This section is empty.
Variables ¶
View Source
var FIELD_PRESET = map[string]string{
"id": "ID",
"ip": "IP",
}
Functions ¶
func ToCamelCase ¶
ToCamelCase converts a snake_case string to camelCase.
func ToSnakeCase ¶
ToSnakeCase converts a camelCase string to snake_case.
Types ¶
type Column ¶
type Column struct { Field *Field Charsets *Charsets IsUnsigned bool IsNullable bool IsAutoInc bool KeyType KeyType Comments string DefaultValue string }
func (*Column) AutoIncrement ¶
type DBM ¶
type DBM struct { Tables []*Table // contains filtered or unexported fields }
func (*DBM) SetPackageName ¶
func (*DBM) ToStructToPath ¶
func (*DBM) ToStructToSingleFile ¶
func (*DBM) TryToStructToSingleFile ¶
type DBSource ¶
func NewDBSource ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.