added new functions
[meabook] / 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):