Documentation ¶
Overview ¶
Package createtable 分析 create table 语句的内容
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Sqlite3Constraint ¶
type Sqlite3Constraint struct { Type core.ConstraintType SQL string // 在 Create Sqlite3Table 中的语句 }
Sqlite3Constraint 从 create table 语句解析出来的约束信息
type Sqlite3Table ¶
type Sqlite3Table struct { Columns map[string]string // 列信息,名称 => SQL 语句 Constraints map[string]*Sqlite3Constraint Indexes map[string]*Sqlite3Index }
Sqlite3Table 包含从 sqlite_master 中获取的与当前表相关的信息
func ParseSqlite3CreateTable ¶
func ParseSqlite3CreateTable(table string, engine core.Engine) (*Sqlite3Table, error)
ParseSqlite3CreateTable 从 sqlite_master 中获取 create table 并分析其内容
func (Sqlite3Table) CreateTableSQL ¶
func (t Sqlite3Table) CreateTableSQL(name string) (string, error)
CreateTableSQL 生成 create table 语句
Click to show internal directories.
Click to hide internal directories.