summaryrefslogtreecommitdiffstats
path: root/pica-client
diff options
context:
space:
mode:
authorAnton <anton@picapica>2024-08-11 23:46:16 +0400
committerAnton <anton@picapica>2024-08-11 23:46:16 +0400
commitc3d7214d09448e8fe5253213a4770edf2abaae9f (patch)
tree2ff81336d43d6cc5215ee302be68013c62a6fcc0 /pica-client
parentf3e70e541ef32a0c2b7eba226e5040de03bb8d9c (diff)
downloadpica-pica-c3d7214d09448e8fe5253213a4770edf2abaae9f.tar.gz
pica-pica-c3d7214d09448e8fe5253213a4770edf2abaae9f.zip
Use single-quotes around string literals in SQL, make sqlite with strict configuration happy.
Diffstat (limited to 'pica-client')
-rw-r--r--pica-client/main.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/pica-client/main.cpp b/pica-client/main.cpp
index d44025d..c021209 100644
--- a/pica-client/main.cpp
+++ b/pica-client/main.cpp
@@ -112,9 +112,9 @@ static bool create_database()
inactive_count int not null,\
constraint pk primary key (address,port) on conflict replace \
);");
- query.exec("insert into nodes values(\"picapica.im\", 2233, 0, 0);");
- query.exec("insert into nodes values(\"picapica.im\", 2299, 0, 0);");
- query.exec("insert into nodes values(\"picapica.ge\", 2299, 0, 0);");
+ query.exec("insert into nodes values('picapica.im', 2233, 0, 0);");
+ query.exec("insert into nodes values('picapica.im', 2299, 0, 0);");
+ query.exec("insert into nodes values('picapica.ge', 2299, 0, 0);");
if (query.lastError().isValid())
goto showerror;
@@ -187,7 +187,7 @@ static bool update_database()
QSqlQuery query;
//checking if table schema_version exists. If not, then database belongs to pica-client before 0.5.3 version
- query.exec("select count(*) from sqlite_master where name=\"schema_version\"");
+ query.exec("select count(*) from sqlite_master where name='schema_version'");
query.next();
if (query.lastError().isValid())