[Zapp-cvs-commit] ZApp/leverMethods/PG insertItemLever.plain,1.10,1.11 updateItemLever.plain,1.6,1.7
Brought to you by:
sspickle
|
From: <ssp...@us...> - 2003-06-18 02:39:15
|
Update of /cvsroot/zapp/ZApp/leverMethods/PG
In directory sc8-pr-cvs1:/tmp/cvs-serv354/leverMethods/PG
Modified Files:
insertItemLever.plain updateItemLever.plain
Log Message:
fixed problems in PG insert/update levers with timestamp properties
Index: insertItemLever.plain
===================================================================
RCS file: /cvsroot/zapp/ZApp/leverMethods/PG/insertItemLever.plain,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** insertItemLever.plain 13 May 2003 13:48:58 -0000 1.10
--- insertItemLever.plain 18 Jun 2003 02:39:12 -0000 1.11
***************
*** 23,27 ****
'text':'string',
'boolean':'string',
! 'timestamp':'timestamp',
'string1k':'string',
}
--- 23,27 ----
'text':'string',
'boolean':'string',
! 'timestamp':'string',
'string1k':'string',
}
***************
*** 36,48 ****
for item in pm:
! theType = item.get('dbType',item.get('sqlType'))
mode = item.get('mode','')
itemID = item['id']
! theType = typeLookups.get(theType, theType)
if mode:
columnList.append(itemID)
argumentList.append('%s=""' % itemID)
! itemList.append('<dtml-sqlvar %s type="%s">' % (item['id'], theType))
templateString = templateString % (specialist.id, string.join(columnList, ',\n'), string.join(itemList,',\n'))
--- 36,52 ----
for item in pm:
! dbType = item.get('dbType',item.get('sqlType'))
mode = item.get('mode','')
itemID = item['id']
! theType = typeLookups.get(dbType, dbType)
if mode:
columnList.append(itemID)
argumentList.append('%s=""' % itemID)
! if dbType == 'timestamp':
! fmtString = ("'<dtml-var %s " % itemID) + "fmt=\"%m/%d/%Y %H:%M\" sql_quote>'"
! itemList.append(fmtString)
! else:
! itemList.append('<dtml-sqlvar %s type="%s">' % (item['id'], theType))
templateString = templateString % (specialist.id, string.join(columnList, ',\n'), string.join(itemList,',\n'))
Index: updateItemLever.plain
===================================================================
RCS file: /cvsroot/zapp/ZApp/leverMethods/PG/updateItemLever.plain,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** updateItemLever.plain 9 May 2003 12:53:08 -0000 1.6
--- updateItemLever.plain 18 Jun 2003 02:39:12 -0000 1.7
***************
*** 23,27 ****
'text':'string',
'boolean':'string',
! 'timestamp':'timestamp',
'string1k':'string',
}
--- 23,27 ----
'text':'string',
'boolean':'string',
! 'timestamp':'string',
'string1k':'string',
}
***************
*** 43,52 ****
if mode or update_template:
! theType = item.get('sqlType',item.get('dbType'))
if update_template:
itemString = update_template % item
else:
! theType = typeLookups.get(theType, theType)
! itemString = '%s = <dtml-sqlvar %s type="%s">' % (itemID, itemID, theType)
itemList.append( itemString )
--- 43,56 ----
if mode or update_template:
! dbType = item.get('sqlType',item.get('dbType'))
if update_template:
itemString = update_template % item
else:
! if dbType == 'timestamp':
! fmtString = ("'<dtml-var %s " % itemID) + "fmt=\"%m/%d/%Y %H:%M\" sql_quote>'"
! itemString = "%s = %s" % (itemID, fmtString)
! else:
! theType = typeLookups.get(dbType, dbType)
! itemString = '%s = <dtml-sqlvar %s type="%s">' % (itemID, itemID, theType)
itemList.append( itemString )
|