diff options
Diffstat (limited to 'vendor/github.com/go-xorm/core/dialect.go')
-rw-r--r-- | vendor/github.com/go-xorm/core/dialect.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/vendor/github.com/go-xorm/core/dialect.go b/vendor/github.com/go-xorm/core/dialect.go index 6f2e81d017..c288a08478 100644 --- a/vendor/github.com/go-xorm/core/dialect.go +++ b/vendor/github.com/go-xorm/core/dialect.go @@ -74,6 +74,7 @@ type Dialect interface { GetIndexes(tableName string) (map[string]*Index, error) Filters() []Filter + SetParams(params map[string]string) } func OpenDialect(dialect Dialect) (*DB, error) { @@ -148,7 +149,8 @@ func (db *Base) SupportDropIfExists() bool { } func (db *Base) DropTableSql(tableName string) string { - return fmt.Sprintf("DROP TABLE IF EXISTS `%s`", tableName) + quote := db.dialect.Quote + return fmt.Sprintf("DROP TABLE IF EXISTS %s", quote(tableName)) } func (db *Base) HasRecords(query string, args ...interface{}) (bool, error) { @@ -289,6 +291,9 @@ func (b *Base) LogSQL(sql string, args []interface{}) { } } +func (b *Base) SetParams(params map[string]string) { +} + var ( dialects = map[string]func() Dialect{} ) |