Add support for creation of TEMP tables
This commit is contained in:
@@ -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 "
|
||||
}
|
||||
|
||||
@@ -42,6 +42,8 @@ type (
|
||||
Indexes []*Index
|
||||
Comment string
|
||||
|
||||
Temporary bool
|
||||
|
||||
// implementation variations
|
||||
Meta map[string]interface{}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user