SchemaTable with MSSQL support

This commit is contained in:
Sergey Kurt 2017-03-13 16:25:12 +03:00
parent 132339026a
commit 54af37ef9a

View file

@ -85,7 +85,7 @@ func init() {
// for Postgres: "schema_name"."table_name", versus
// simply "table_name" for MySQL (because it does not support real schemas)
func SchemaTable(lq, rq string, driver string, schema string, table string) string {
if driver == "postgres" && schema != "public" {
if (driver == "postgres" && schema != "public") || driver == "mssql" {
return fmt.Sprintf(`%s%s%s.%s%s%s`, lq, schema, rq, lq, table, rq)
}