X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=database%2FSQLite.py;h=f26d1763cdaee0485ed81050bb2be5cb6bcc4154;hb=18eef3299409c6f8da9b15e4d551f894d1c223c9;hp=5cd8bb40d91e0ba097dad102e15beadb1b1dfc7b;hpb=7ef832876ff8ba8a0f24ba8bac24cad5dcb3f062;p=meabook diff --git a/database/SQLite.py b/database/SQLite.py index 5cd8bb4..f26d176 100644 --- a/database/SQLite.py +++ b/database/SQLite.py @@ -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):