[Zope-CVS] CVS: Products/Ape/apelib/sql - structure.py:1.3
Shane Hathaway
shane@zope.com
Sat, 29 Mar 2003 21:15:43 -0500
Update of /cvs-repository/Products/Ape/apelib/sql
In directory cvs.zope.org:/tmp/cvs-serv7510/sql
Modified Files:
structure.py
Log Message:
- Finished the plumbing for writing template and script files in text
mode.
- Fixed an intermittent conflict error resulting from mismanagement of
SQL-based modification times.
=== Products/Ape/apelib/sql/structure.py 1.2 => 1.3 ===
--- Products/Ape/apelib/sql/structure.py:1.2 Sat Mar 29 17:27:50 2003
+++ Products/Ape/apelib/sql/structure.py Sat Mar 29 21:15:13 2003
@@ -16,8 +16,6 @@
$Id$
"""
-import time
-
from apelib.core.interfaces import IGateway
from apelib.core.schemas import FieldSchema, RowSequenceSchema
from sqlbase import SQLGatewayBase
@@ -217,12 +215,10 @@
class SQLModTime (SQLGatewayBase):
"""SQL object mod time gateway"""
- # This class stores integers but the state is returned as a float.
- # Integers avoid conflicts arising from rounding errors in the database.
__implements__ = IGateway
- schema = FieldSchema('mtime', 'float')
+ schema = FieldSchema('mtime', 'int') # second
table_base_name = 'mtime'
@@ -254,8 +250,8 @@
if items:
state = long(items[0][0])
else:
- state = long(time.time())
- return float(state), state
+ state = 0L
+ return state, state
def store(self, event, state):
key = long(event.getKey())