From e6ac401ab404ca378dcbc817eedb49cbb82c0362 Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Fri, 27 Sep 2013 09:29:48 +0200 Subject: [PATCH] Set internal data on rows after insertion --- core/db.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/db.py b/core/db.py index 12e5ebc..85a4b07 100644 --- a/core/db.py +++ b/core/db.py @@ -165,7 +165,6 @@ class DatabaseTable(Table): self._cache = {} class MemoryTable(Table): - # TODO: .refresh() def __init__(self, database, table_name): Table.__init__(self, database, table_name) self.data = {} @@ -183,7 +182,9 @@ class MemoryTable(Table): def _process_insert(self, value, key=None): rowid = Table._process_insert(self, value, key) self.data[rowid] = value - # TODO: Set table and stuff internally + self.data[rowid]._nexus_db = self.db + self.data[rowid]._nexus_table = self.table + self.data[rowid]._nexus_type = "memory" # TODO: Set None for other unset properties? return rowid