diff options
author | Sebastian Reichel <sre@ring0.de> | 2012-05-24 14:57:32 +0200 |
---|---|---|
committer | Sebastian Reichel <sre@ring0.de> | 2012-05-24 14:57:32 +0200 |
commit | ff74ec3f5c466ae14f4fcb0128cecf14fa5cbf13 (patch) | |
tree | 25f809d2c293d96c8997449dc191fa23fa80548d /db.vala | |
parent | 0032c6f0aad257bb0483e29054004cbc3632c49f (diff) | |
download | serial-barcode-scanner-ff74ec3f5c466ae14f4fcb0128cecf14fa5cbf13.tar.bz2 |
user ids are 2**31 max
Diffstat (limited to 'db.vala')
-rw-r--r-- | db.vala | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -8,7 +8,7 @@ public class Database { private Sqlite.Statement undo_stmt3; private Sqlite.Statement stock_stmt1; private Sqlite.Statement stock_stmt2; - uint64 user = 0; + int32 user = 0; uint64 product = 0; bool logged_in = false; bool stock_mode = false; @@ -71,7 +71,7 @@ public class Database { } - public bool login(uint64 id) { + public bool login(int32 id) { this.user = id; this.logged_in = true; return true; @@ -90,7 +90,7 @@ public class Database { int64 timestamp = (new DateTime.now_utc()).to_unix(); this.purchase_stmt1.reset(); - this.purchase_stmt1.bind_text(1, "%llu".printf(user)); + this.purchase_stmt1.bind_text(1, "%lld".printf(user)); this.purchase_stmt1.bind_text(2, "%llu".printf(article)); this.purchase_stmt1.bind_text(3, "%llu".printf(timestamp)); |