[SQL-CVS] r1156 - SQLObject/trunk/sqlobject/mssql
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
|
From: <sub...@co...> - 2005-10-27 16:37:11
|
Author: phd
Date: 2005-10-27 16:37:05 +0000 (Thu, 27 Oct 2005)
New Revision: 1156
Modified:
SQLObject/trunk/sqlobject/mssql/mssqlconnection.py
Log:
Removed trailing spaces.
Modified: SQLObject/trunk/sqlobject/mssql/mssqlconnection.py
===================================================================
--- SQLObject/trunk/sqlobject/mssql/mssqlconnection.py 2005-10-27 16:32:02 UTC (rev 1155)
+++ SQLObject/trunk/sqlobject/mssql/mssqlconnection.py 2005-10-27 16:37:05 UTC (rev 1156)
@@ -67,7 +67,7 @@
ON obj.id = col.id
WHERE obj.name = '%s'
and col.autoval is not null
-
+
"""
def _hasIdentity(self, conn, table):
query = self.HAS_IDENTITY % table
@@ -95,7 +95,7 @@
del values[i]
except ValueError:
pass
-
+
if has_identity:
if id is not None:
c.execute('SET IDENTITY_INSERT %s ON' % table)
@@ -156,11 +156,11 @@
column.dbName))
SHOW_COLUMNS = """
- select
- name,
- length,
- ( select name
- from systypes
+ select
+ name,
+ length,
+ ( select name
+ from systypes
where cast(xusertype as int)= cast(sc.xtype as int)
) datatype,
isnullable,
@@ -170,13 +170,13 @@
from syscolumns sc
LEFT OUTER JOIN syscomments m on sc.cdefault = m.id
AND m.colid = 1
- where
- sc.id in (select id
- from sysobjects
+ where
+ sc.id in (select id
+ from sysobjects
where name = '%s')
order by
colorder"""
-
+
def columnsFromSchema(self, tableName, soClass):
colData = self.queryAll(self.SHOW_COLUMNS
% tableName)
@@ -189,7 +189,7 @@
kw['name'] = soClass.sqlmeta.style.dbColumnToPythonAttr(field)
kw['notNone'] = not nullAllowed
if (defaultText):
- # Strip ( and )
+ # Strip ( and )
defaultText = defaultText[1:-1]
if defaultText[0] == "'":
defaultText = defaultText[1:-1]
|