Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type SQLiteCheck ¶ added in v0.1.5
type SQLiteConstraint ¶
type SQLiteCreateTable ¶
type SQLiteCreateTable struct { TableName string `parser:"'CREATE' 'TABLE' ( 'IF' 'NOT' 'EXISTS' )? @Ident"` FieldExpressions []*SQLiteFieldExpression `parser:"'(' @@ ( ',' @@ )* ( ',' )?"` PrimaryKeys []string `parser:"( 'PRIMARY' 'KEY' '(' @Ident ( ',' @Ident )* ')' ( ',' )? )?"` ForeignKeys []*SQLiteForeignKey `parser:"( 'FOREIGN' 'KEY' @@ ( ',' 'FOREIGN' 'KEY' @@ )* ( ',' )? )?"` Constraints []*SQLiteConstraint `parser:"( 'CONSTRAINT' @@ ( ',' 'CONSTRAINT' @@ )* ( ',' )? )?"` Checks []*SQLiteCheck `parser:"( 'CHECK' '(' @@ ')' ( ',' 'CHECK' '(' @@ ')' )* )? ')'"` }
type SQLiteFieldExpression ¶
type SQLiteFieldExpression struct { Name string `parser:"@Ident"` Type string `parser:"@Ident"` Limit string `parser:"( '(' Number ')' )?"` NotNull bool `parser:"( @'NOT' 'NULL' | @'NOT_NULL'"` Default string `parser:"| 'DEFAULT' '(' @Ident ')'"` AutoIncrement bool `parser:"| @'AUTO_INCREMENT' )*"` }
type SQLiteForeignKey ¶ added in v0.1.5
type SQLiteTable ¶
type SQLiteTable struct {
// contains filtered or unexported fields
}
func SelectTables ¶
func SelectTables(conn *sql.DB) ([]*SQLiteTable, error)
Click to show internal directories.
Click to hide internal directories.