Revision b7faa11e snf-pithos-backend/pithos/backends/lib/sqlite/quotaholder_serials.py
b/snf-pithos-backend/pithos/backends/lib/sqlite/quotaholder_serials.py | ||
---|---|---|
41 | 41 |
DBWorker.__init__(self, **params) |
42 | 42 |
execute = self.execute |
43 | 43 |
|
44 |
execute(""" create table if not exists qh_sync
|
|
44 |
execute(""" create table if not exists qh_serials
|
|
45 | 45 |
( serial bigint primary key) """) |
46 | 46 |
|
47 | 47 |
def get_lower(self, serial): |
48 | 48 |
"""Return entries lower than serial.""" |
49 | 49 |
|
50 |
q = "select serial from qh_sync where serial < ?"
|
|
50 |
q = "select serial from qh_serials where serial < ?"
|
|
51 | 51 |
self.execute(q, (serial,)) |
52 | 52 |
return self.fetchall() |
53 | 53 |
|
... | ... | |
55 | 55 |
"""Insert a serial. |
56 | 56 |
""" |
57 | 57 |
|
58 |
q = "insert or ignore into qh_sync (serial) values (?)"
|
|
58 |
q = "insert or ignore into qh_serials (serial) values (?)"
|
|
59 | 59 |
return self.execute(q, (serial,)).lastrowid |
60 | 60 |
|
Also available in: Unified diff