Add support for new query API

This commit is contained in:
Patrick Pacher 2022-04-26 14:59:27 +02:00
parent e21eb16a6b
commit d098f1c137
No known key found for this signature in database
GPG key ID: E8CD2DA160925A6D
10 changed files with 1154 additions and 43 deletions

View file

@ -53,6 +53,15 @@ type (
}
)
func (ts TableSchema) GetColumnDef(name string) *ColumnDef {
for _, def := range ts.Columns {
if def.Name == name {
return &def
}
}
return nil
}
func (ts TableSchema) CreateStatement(ifNotExists bool) string {
sql := "CREATE TABLE"
if ifNotExists {