added lost function
authorMax Usachev <maxusachev@gmail.com>
Thu, 10 Jun 2010 13:11:03 +0000 (16:11 +0300)
committerMax Usachev <maxusachev@gmail.com>
Thu, 10 Jun 2010 13:11:03 +0000 (16:11 +0300)
database/SQLite.py

index 5cd8bb4..f26d176 100644 (file)
@@ -74,6 +74,11 @@ class SQLite:
         execute("DELETE from struct")
         self.conn.commit()
 
+    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):