projects
/
meabook
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9db905c
)
added new functions
author
Max Usachev
<maxusachev@gmail.com>
Wed, 9 Jun 2010 11:35:16 +0000
(14:35 +0300)
committer
Max Usachev
<maxusachev@gmail.com>
Wed, 9 Jun 2010 11:35:16 +0000
(14:35 +0300)
database/SQLite.py
patch
|
blob
|
history
diff --git
a/database/SQLite.py
b/database/SQLite.py
index
2da8a8b
..
a4a7d36
100644
(file)
--- a/
database/SQLite.py
+++ b/
database/SQLite.py
@@
-117,6
+117,14
@@
class SQLite:
self.conn.commit()
self.conn.commit()
+ def get_entry(self, value):
+ """Gets full entry imformation from DATA table."""
+
+ _id = self.conn.execute("SELECT id FROM data WHERE value=?", \
+ (value,)).fetchone()[0]
+ return dict([(key, value) for key, value in self.conn.execute("\
+ SELECT field_id, value FROM data WHERE id=?", (_id,)).fetchall()])
+
def get_toplevel_entries(self):
"""Returns list of all toplevel entries from DATA table."""
def get_toplevel_entries(self):
"""Returns list of all toplevel entries from DATA table."""