Documentation ¶
Index ¶
- type Column
- type Index
- type Pgsql
- func (d *Pgsql) GetSqlType(ctx context.Context, goType string, size string) string
- func (d *Pgsql) GetSyncSql(ctx context.Context, db gdb.DB, task model.SyncTask) (list []string, err error)
- func (d *Pgsql) LoadSchema(ctx context.Context, db gdb.DB) (schema model.Schema, err error)
- func (d *Pgsql) Schema(schema string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Column ¶
type Column struct { Field string `orm:"field"` // 字段名 Type string `orm:"type"` // 字段类型 NotNull string `orm:"not_null"` // 是否为空 t/f Length int `orm:"length"` // 字段长度 Typmod int `orm:"typmod"` // 字段长度 Comment string `orm:"comment"` // 字段注释 Table string `orm:"table"` // 表名 Num int `orm:"num"` // 字段序号 Conkey []int `orm:"conkey"` // 主键字段序号 PrimaryKey bool }
type Pgsql ¶
type Pgsql struct {
// contains filtered or unexported fields
}
func (*Pgsql) GetSqlType ¶
func (*Pgsql) GetSyncSql ¶
func (d *Pgsql) GetSyncSql(ctx context.Context, db gdb.DB, task model.SyncTask) (list []string, err error)
GetSyncSql 更新数据库结构
func (*Pgsql) LoadSchema ¶
LoadSchema 获取数据库结构
Click to show internal directories.
Click to hide internal directories.