Total Complexity | 3 |
Total Lines | 20 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | from api.database.DAL import SQLite |
||
2 | |||
3 | class Entry: |
||
4 | id = None |
||
5 | db = None |
||
6 | table = None |
||
7 | data = None |
||
8 | |||
9 | def __init__(self, input_id, database, table_in, data): |
||
10 | self.id = input_id |
||
11 | self.db = database |
||
12 | self.table = table_in |
||
13 | self.data = data |
||
14 | |||
15 | def edit(self, newData): |
||
16 | SQLite.db_entry_edit(self.db, self.table, self.id, newData) |
||
17 | |||
18 | def delete(self): |
||
19 | SQLite.db_entry_delete(self.db, self.table, self.id) |