3
0

Add support for creation of TEMP tables

This commit is contained in:
Denis Arh
2022-10-06 13:01:07 +02:00
committed by Tomaž Jerman
parent 9ab496b3d4
commit f2e4d23cb0
2 changed files with 7 additions and 1 deletions

View File

@@ -93,8 +93,12 @@ func Exec(ctx context.Context, db sqlx.ExtContext, ss ...any) (err error) {
}
func (t *CreateTable) String() string {
sql := "CREATE TABLE "
sql := "CREATE "
if t.Table.Temporary {
sql += "TEMPORARY "
}
sql += "TABLE "
if !t.OmitIfNotExistsClause {
sql += "IF NOT EXISTS "
}

View File

@@ -42,6 +42,8 @@ type (
Indexes []*Index
Comment string
Temporary bool
// implementation variations
Meta map[string]interface{}
}