varquote for mssql and postgresql
This commit is contained in:
@@ -1 +1 @@
|
|||||||
Version 2.00.0 (2012-07-04 23:30:47) dev
|
Version 2.00.0 (2012-07-05 09:21:49) dev
|
||||||
|
|||||||
@@ -2155,6 +2155,9 @@ class PostgreSQLAdapter(BaseAdapter):
|
|||||||
'big-reference': 'BIGINT REFERENCES %(foreign_key)s ON DELETE %(on_delete_action)s',
|
'big-reference': 'BIGINT REFERENCES %(foreign_key)s ON DELETE %(on_delete_action)s',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def varquote(self,name):
|
||||||
|
return '"%s"' % name
|
||||||
|
|
||||||
def adapt(self,obj):
|
def adapt(self,obj):
|
||||||
return psycopg2_adapt(obj).getquoted()
|
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',
|
'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):
|
def EXTRACT(self,field,what):
|
||||||
return "DATEPART(%s,%s)" % (what, self.expand(field))
|
return "DATEPART(%s,%s)" % (what, self.expand(field))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user