diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-09-14 11:58:34 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-09-14 11:58:34 +0000 |
commit | f709218364f7d40e5a13938886514e866602715d (patch) | |
tree | eb9e221c15edd09d8857c668037051ec16965e05 /src/datastore | |
parent | fb806dd47c4804eaf0d3a2a778a0ccda909b10c7 (diff) | |
download | gnunet-f709218364f7d40e5a13938886514e866602715d.tar.gz gnunet-f709218364f7d40e5a13938886514e866602715d.zip |
indenting
Diffstat (limited to 'src/datastore')
-rw-r--r-- | src/datastore/plugin_datastore_sqlite.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/src/datastore/plugin_datastore_sqlite.c b/src/datastore/plugin_datastore_sqlite.c index 4a66c44ca..c5952bcb0 100644 --- a/src/datastore/plugin_datastore_sqlite.c +++ b/src/datastore/plugin_datastore_sqlite.c | |||
@@ -326,21 +326,22 @@ database_setup (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
326 | (sq_prepare | 326 | (sq_prepare |
327 | (plugin->dbh, | 327 | (plugin->dbh, |
328 | "SELECT type,prio,anonLevel,expire,hash,value,_ROWID_ " | 328 | "SELECT type,prio,anonLevel,expire,hash,value,_ROWID_ " |
329 | "FROM gn090 INDEXED BY idx_repl_rvalue " "WHERE repl=?2 AND" | 329 | "FROM gn090 INDEXED BY idx_repl_rvalue " |
330 | " (rvalue>=?1 OR" | 330 | "WHERE repl=?2 AND " |
331 | " NOT EXISTS (SELECT 1 FROM gn090 INDEXED BY idx_repl_rvalue WHERE repl=?2 AND rvalue>=?1 LIMIT 1))" | 331 | " (rvalue>=?1 OR " |
332 | " ORDER BY rvalue ASC" " LIMIT 1", | 332 | " NOT EXISTS (SELECT 1 FROM gn090 INDEXED BY idx_repl_rvalue WHERE repl=?2 AND rvalue>=?1 LIMIT 1) ) " |
333 | "ORDER BY rvalue ASC LIMIT 1", | ||
333 | &plugin->selRepl) != SQLITE_OK) || | 334 | &plugin->selRepl) != SQLITE_OK) || |
334 | (sq_prepare | 335 | (sq_prepare |
335 | (plugin->dbh, | 336 | (plugin->dbh, |
336 | "SELECT MAX(repl) " "FROM gn090 INDEXED BY idx_repl_rvalue", | 337 | "SELECT MAX(repl) FROM gn090 INDEXED BY idx_repl_rvalue", |
337 | &plugin->maxRepl) != SQLITE_OK) || | 338 | &plugin->maxRepl) != SQLITE_OK) || |
338 | (sq_prepare | 339 | (sq_prepare |
339 | (plugin->dbh, | 340 | (plugin->dbh, |
340 | "SELECT type,prio,anonLevel,expire,hash,value,_ROWID_ " | 341 | "SELECT type,prio,anonLevel,expire,hash,value,_ROWID_ " |
341 | "FROM gn090 INDEXED BY idx_expire" | 342 | "FROM gn090 INDEXED BY idx_expire " |
342 | " WHERE NOT EXISTS (SELECT 1 FROM gn090 WHERE expire < ?1 LIMIT 1) OR (expire < ?1) " | 343 | "WHERE NOT EXISTS (SELECT 1 FROM gn090 WHERE expire < ?1 LIMIT 1) OR (expire < ?1) " |
343 | " ORDER BY expire ASC LIMIT 1", &plugin->selExpi) != SQLITE_OK) || | 344 | "ORDER BY expire ASC LIMIT 1", &plugin->selExpi) != SQLITE_OK) || |
344 | (sq_prepare | 345 | (sq_prepare |
345 | (plugin->dbh, | 346 | (plugin->dbh, |
346 | "SELECT type,prio,anonLevel,expire,hash,value,_ROWID_ " | 347 | "SELECT type,prio,anonLevel,expire,hash,value,_ROWID_ " |
@@ -350,12 +351,12 @@ database_setup (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
350 | &plugin->selZeroAnon) != SQLITE_OK) || | 351 | &plugin->selZeroAnon) != SQLITE_OK) || |
351 | (sq_prepare | 352 | (sq_prepare |
352 | (plugin->dbh, | 353 | (plugin->dbh, |
353 | "INSERT INTO gn090 (repl, type, prio, " | 354 | "INSERT INTO gn090 (repl, type, prio, anonLevel, expire, rvalue, hash, vhash, value) " |
354 | "anonLevel, expire, rvalue, hash, vhash, value) " | ||
355 | "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)", | 355 | "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)", |
356 | &plugin->insertContent) != SQLITE_OK) || | 356 | &plugin->insertContent) != SQLITE_OK) || |
357 | (sq_prepare | 357 | (sq_prepare |
358 | (plugin->dbh, "DELETE FROM gn090 WHERE _ROWID_ = ?", | 358 | (plugin->dbh, |
359 | "DELETE FROM gn090 WHERE _ROWID_ = ?", | ||
359 | &plugin->delRow) != SQLITE_OK)) | 360 | &plugin->delRow) != SQLITE_OK)) |
360 | { | 361 | { |
361 | LOG_SQLITE (plugin, NULL, GNUNET_ERROR_TYPE_ERROR, "precompiling"); | 362 | LOG_SQLITE (plugin, NULL, GNUNET_ERROR_TYPE_ERROR, "precompiling"); |