Versions in this module Expand all Collapse all v0 v0.0.2 Aug 23, 2022 Changes in this version + const ActionCreate + const ActionDelete + const ActionRead + const ActionTransaction + const ActionUpdate + const TypeNullDecimal + const TypeNullLongLong + const TypeNullString + const WildCard + var OpName = []string + var Operator = []string + func NewParameter(column string, tp string, thirdPkg string) parameter.Parameter + type Action int + type ByItem struct + Column string + ColumnInfo Column + Comment Comment + Desc bool + TableInfo *Table + func (b *ByItem) IsValid() bool + type ByItems []*ByItem + func (b ByItems) IsValid() bool + func (b ByItems) ParameterStructure(identifier string) (string, error) + func (b ByItems) ParameterStructureName(identifier string) string + func (b ByItems) ParameterThirdImports() (string, error) + func (b ByItems) Parameters(pkg string) (string, error) + func (b ByItems) SQL() (string, error) + type Clause struct + Column string + ColumnInfo Column + Comment Comment + Left *Clause + OP OP + Right *Clause + TableInfo *Table + func (c *Clause) IsValid() bool + func (c *Clause) ParameterStructure(identifier string) (string, error) + func (c *Clause) ParameterStructureName(identifier string) string + func (c *Clause) ParameterThirdImports() (string, error) + func (c *Clause) Parameters(pkg string) (string, error) + func (c *Clause) SQL() (string, error) + type Column struct + AggregateCall bool + Name string + TP byte + func (c Column) DataType() (parameter.Parameter, error) + func (c Column) GoType() (string, error) + func (c Column) HasComment() bool + type ColumnOption struct + AutoIncrement bool + Comment string + HasDefaultValue bool + NotNull bool + Unsigned bool + type Columns []Column + func (cs Columns) GetColumn(name string) (Column, bool) + func (cs Columns) Has(name string) bool + type Comment struct + FuncName string + LineText []string + OriginText string + type Constraint struct + Index map[string][]string + PrimaryKey map[string][]string + UniqueKey map[string][]string + func NewConstraint() *Constraint + func (c *Constraint) AppendIndex(key string, columns ...string) + func (c *Constraint) AppendPrimaryKey(key string, columns ...string) + func (c *Constraint) AppendUniqueKey(key string, columns ...string) + func (c *Constraint) IsEmpty() bool + func (c *Constraint) Merge(constraint *Constraint) + type Context struct + DeleteStmt []*DeleteStmt + InsertStmt []*InsertStmt + SelectStmt []*SelectStmt + Table *Table + Transaction []*Transaction + UpdateStmt []*UpdateStmt + func From(dxl *DXL) ([]Context, error) + type DDL struct + Table *Table + func (d *DDL) IsEmpty() bool + type DML interface + SQLText func() string + TableName func() string + type DXL struct + DDL []*DDL + DML []DML + func (dxl *DXL) Validate() error + type DeleteStmt struct + Action Action + From string + FromInfo *Table + Limit *Limit + OrderBy ByItems + SQL string + Where *Clause + func (d *DeleteStmt) HasArg() bool + func (d *DeleteStmt) SQLText() string + func (d *DeleteStmt) TableName() string + type Field struct + ASName string + AggregateCall bool + ColumnName string + TP byte + func (f Field) Name() string + type Fields []Field + type InsertStmt struct + Action Action + ColumnInfo Columns + Columns []string + SQL string + Table string + TableInfo *Table + func (i *InsertStmt) HasArg() bool + func (i *InsertStmt) SQLText() string + func (i *InsertStmt) TableName() string + type Limit struct + Comment Comment + Count int64 + Offset int64 + TableInfo *Table + func (l *Limit) IsValid() bool + func (l *Limit) LimitParameter(pkg string) string + func (l *Limit) Multiple() bool + func (l *Limit) OffsetParameter(pkg string) string + func (l *Limit) One() bool + func (l *Limit) ParameterStructure() (string, error) + func (l *Limit) ParameterStructureName() string + func (l *Limit) ParameterThirdImports() (string, error) + func (l *Limit) Parameters(pkg string) (string, error) + func (l *Limit) SQL() (string, error) + type OP int + const And + const Between + const Case + const ColumnValue + const EQ + const GE + const GT + const In + const LE + const LT + const Like + const NE + const Not + const NotBetween + const NotIn + const NotLike + const Or + const Parentheses + type SelectStmt struct + Action Action + ColumnInfo Columns + Columns Fields + Distinct bool + From string + FromInfo *Table + GroupBy ByItems + Having *Clause + Limit *Limit + OrderBy ByItems + SQL string + SelectSQL string + Where *Clause + func (s *SelectStmt) ContainsExtraColumns() bool + func (s *SelectStmt) HasArg() bool + func (s *SelectStmt) ReceiverName() string + func (s *SelectStmt) ReceiverStructure(orm string) string + func (s *SelectStmt) SQLText() string + func (s *SelectStmt) TableName() string + type Table struct + Columns Columns + Constraint Constraint + Name string + Schema string + func (t *Table) ColumnList() []string + func (t *Table) GetColumnByName(name string) (Column, bool) + func (t *Table) HasOnePrimaryKey() bool + func (t *Table) IsPrimary(name string) bool + func (t *Table) PrimaryColumn() Column + func (t *Table) PrimaryColumnList() Columns + type Transaction struct + Action Action + SQL string + Statements []DML + func (t Transaction) HasArg() bool + func (t Transaction) SQLText() string + func (t Transaction) TableName() string + type Type byte + type UpdateStmt struct + Action Action + ColumnInfo Columns + Columns []string + Limit *Limit + OrderBy ByItems + SQL string + Table string + TableInfo *Table + Where *Clause + func (u *UpdateStmt) HasArg() bool + func (u *UpdateStmt) SQLText() string + func (u *UpdateStmt) TableName() string