Documentation ¶
Index ¶
- type PKType
- type Table
- func (this *Table) FilterRow(row []interface{}) bool
- func (this *Table) GetPKCrc32(row []interface{}) uint32
- func (this *Table) GetPKValues(row []interface{}) []interface{}
- func (this *Table) GetUseRow(row []interface{}) ([]interface{}, error)
- func (this *Table) InitSQLTemplate()
- func (this *Table) SetMTableInfo(mTable *visitor.MatchTable) error
- func (this *Table) SetPKValues(row []interface{}, pkValues []interface{})
- func (this *Table) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Table ¶
type Table struct { SchemaName string TableName string ColumnNames []string // 表所有的字段 ColumnPosMap map[string]int // 每个字段对应的slice位置 UseColumnNames []string // 最终需要使用的字段 UseColumnPos []int // 字段对应的位点 PKColumnNames []string // 主键的所有字段 PKType // 主键类型 全部列. 主键. 唯一键 InsertTemplate string // insert sql 模板 UpdateTemplate string // update sql 模板 DeleteTemplate string // delete sql 模板 CalcOp []interface{} }
func NewTableWithStmt ¶
func NewTableWithStmt(createStmtNode *ast.CreateTableStmt) (*Table, error)
func (*Table) GetPKCrc32 ¶
func (*Table) GetPKValues ¶
func (this *Table) GetPKValues(row []interface{}) []interface{}
func (*Table) SetMTableInfo ¶
func (this *Table) SetMTableInfo(mTable *visitor.MatchTable) error
设置 MTableInfo
func (*Table) SetPKValues ¶
func (this *Table) SetPKValues(row []interface{}, pkValues []interface{})
Click to show internal directories.
Click to hide internal directories.