added lost function
[meabook] / 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):