changeset 14:1b53187ab3ed

merged MattMaker/moin-2.0
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Tue, 22 Feb 2011 23:53:07 +0100
parents ce00ee7625b2 (current diff) adc90500600b (diff)
children f835165ac6f8
files
diffstat 2 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/storage/backends/indexing.py	Tue Feb 22 22:41:28 2011 +0100
+++ b/MoinMoin/storage/backends/indexing.py	Tue Feb 22 23:53:07 2011 +0100
@@ -263,7 +263,7 @@
         item_id = self.get_item_id(uuid)
         if item_id is None:
             res = item_table.insert().values(uuid=uuid, name=name).execute()
-            item_id = res.last_inserted_ids()[0]
+            item_id = res.inserted_primary_key[0]
         self.item_kvstore.store_kv(item_id, metas)
         return item_id
 
@@ -314,7 +314,7 @@
         else:
             dt = datetime.datetime.utcfromtimestamp(timestamp)
             res = rev_table.insert().values(revno=revno, item_id=item_id, datetime=dt).execute()
-            rev_id = res.last_inserted_ids()[0]
+            rev_id = res.inserted_primary_key[0]
 
         self.rev_kvstore.store_kv(rev_id, metas)
 
--- a/MoinMoin/util/kvstore.py	Tue Feb 22 22:41:28 2011 +0100
+++ b/MoinMoin/util/kvstore.py	Tue Feb 22 23:53:07 2011 +0100
@@ -150,7 +150,7 @@
                    wanted_value_type, value_type, name, value)
         else:
             res = key_table.insert().values(name=name, value_type=value_type).execute()
-            key_id = res.last_inserted_ids()[0]
+            key_id = res.inserted_primary_key[0]
         return key_id
 
     def _get_value_id(self, value):
@@ -166,7 +166,7 @@
             value_id = result[0]
         else:
             res = value_table.insert().values(value=value).execute()
-            value_id = res.last_inserted_ids()[0]
+            value_id = res.inserted_primary_key[0]
         return value_id
 
     def _associate(self, ref_id, key_id, value_id):