Passed
Branch unstable (79b831)
by Sydney
01:37
created

api.database.entry.Entry.edit()   A

Complexity

Conditions 1

Size

Total Lines 2
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 2
rs 10
c 0
b 0
f 0
cc 1
nop 2
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)