added new functions
authorMax Usachev <maxusachev@gmail.com>
Wed, 9 Jun 2010 13:21:30 +0000 (16:21 +0300)
committerMax Usachev <maxusachev@gmail.com>
Wed, 9 Jun 2010 13:21:30 +0000 (16:21 +0300)
database/SQLite.py

index a4a7d36..d337060 100644 (file)
@@ -88,6 +88,13 @@ class SQLite:
         except TypeError:
             return None
 
+    def get_fields(self):
+        """Returns all fields from FIELDS table."""
+
+        return [item[0] for item in self.conn.execute( \
+            "SELECT name FROM fields").fetchall()]
+
+
 
     # operations with DATA table
     def add_entry(self, entry):