varquote for mssql and postgresql

This commit is contained in:
mdipierro
2012-07-05 09:21:52 -05:00
parent 6864183739
commit 6169e192f7
2 changed files with 7 additions and 1 deletions
+1 -1
View File
@@ -1 +1 @@
Version 2.00.0 (2012-07-04 23:30:47) dev
Version 2.00.0 (2012-07-05 09:21:49) dev
+6
View File
@@ -2155,6 +2155,9 @@ class PostgreSQLAdapter(BaseAdapter):
'big-reference': 'BIGINT REFERENCES %(foreign_key)s ON DELETE %(on_delete_action)s',
}
def varquote(self,name):
return '"%s"' % name
def adapt(self,obj):
return psycopg2_adapt(obj).getquoted()
@@ -2636,6 +2639,9 @@ class MSSQLAdapter(BaseAdapter):
'reference TFK': ' CONSTRAINT FK_%(foreign_table)s_PK FOREIGN KEY (%(field_name)s) REFERENCES %(foreign_table)s (%(foreign_key)s) ON DELETE %(on_delete_action)s',
}
def varquote(self,name):
return '[%s]' % name
def EXTRACT(self,field,what):
return "DATEPART(%s,%s)" % (what, self.expand(field))