speedup in case of keyed tables
This commit is contained in:
+1
-4
@@ -8386,10 +8386,7 @@ class Table(object):
|
||||
elif isinstance(key, dict):
|
||||
""" for keyed table """
|
||||
query = self._build_query(key)
|
||||
rows = self._db(query).select()
|
||||
if rows:
|
||||
return rows[0]
|
||||
return None
|
||||
return self._db(query).select(limitby=(0,1), orderby_on_limitby=False).first()
|
||||
elif str(key).isdigit() or 'google' in DRIVERS and isinstance(key, Key):
|
||||
return self._db(self._id == key).select(limitby=(0,1), orderby_on_limitby=False).first()
|
||||
elif key:
|
||||
|
||||
Reference in New Issue
Block a user