25 lines
455 B
Go
25 lines
455 B
Go
package sql
|
|
|
|
import "fmt"
|
|
|
|
type CreateTableStatement struct {
|
|
TableName string
|
|
Columns []Column
|
|
}
|
|
|
|
func (c *CreateTableStatement) Print() {
|
|
fmt.Printf("Name: %v\nColumns:\n", c.TableName)
|
|
for _, column := range c.Columns {
|
|
fmt.Printf("- Name: %v\n Type: %v\n Extras:\n", column.Name, column.Type)
|
|
for _, extra := range column.Extra {
|
|
fmt.Printf(" - %v\n", extra)
|
|
}
|
|
}
|
|
}
|
|
|
|
type Column struct {
|
|
Name string
|
|
Type string
|
|
Extra []string
|
|
}
|