diff options
Diffstat (limited to 'vendor/github.com/uptrace/bun/query_table_drop.go')
-rw-r--r-- | vendor/github.com/uptrace/bun/query_table_drop.go | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/vendor/github.com/uptrace/bun/query_table_drop.go b/vendor/github.com/uptrace/bun/query_table_drop.go index 8192bd548..bf7ee3031 100644 --- a/vendor/github.com/uptrace/bun/query_table_drop.go +++ b/vendor/github.com/uptrace/bun/query_table_drop.go @@ -15,6 +15,8 @@ type DropTableQuery struct { ifExists bool } +var _ Query = (*DropTableQuery)(nil) + func NewDropTableQuery(db *DB) *DropTableQuery { q := &DropTableQuery{ baseQuery: baseQuery{ @@ -50,7 +52,7 @@ func (q *DropTableQuery) TableExpr(query string, args ...interface{}) *DropTable } func (q *DropTableQuery) ModelTableExpr(query string, args ...interface{}) *DropTableQuery { - q.modelTable = schema.SafeQuery(query, args) + q.modelTableName = schema.SafeQuery(query, args) return q } @@ -61,6 +63,11 @@ func (q *DropTableQuery) IfExists() *DropTableQuery { return q } +func (q *DropTableQuery) Cascade() *DropTableQuery { + q.cascade = true + return q +} + func (q *DropTableQuery) Restrict() *DropTableQuery { q.restrict = true return q |