- "INSERT INTO peerstoredata (sub_system, peer_id, key, value, expiry) VALUES (?,?,?,?,?);",
- &plugin->insert_peerstoredata);
- sql_prepare(plugin->dbh,
- "SELECT * FROM peerstoredata"
- " WHERE sub_system = ?",
- &plugin->select_peerstoredata);
- sql_prepare(plugin->dbh,
- "SELECT * FROM peerstoredata"
- " WHERE sub_system = ?"
- " AND peer_id = ?",
- &plugin->select_peerstoredata_by_pid);
- sql_prepare(plugin->dbh,
- "SELECT * FROM peerstoredata"
- " WHERE sub_system = ?"
- " AND key = ?",
- &plugin->select_peerstoredata_by_key);
- sql_prepare(plugin->dbh,
- "SELECT * FROM peerstoredata"
- " WHERE sub_system = ?"
- " AND peer_id = ?"
- " AND key = ?",
- &plugin->select_peerstoredata_by_all);
- sql_prepare(plugin->dbh,
- "DELETE FROM peerstoredata"
- " WHERE UINT64_LT(expiry, ?)",
- &plugin->expire_peerstoredata);
- sql_prepare(plugin->dbh,
- "DELETE FROM peerstoredata"
- " WHERE sub_system = ?"
- " AND peer_id = ?"
- " AND key = ?",
- &plugin->delete_peerstoredata);
-
+ "INSERT INTO peerstoredata (sub_system, peer_id, key, value, expiry) VALUES (?,?,?,?,?);",
+ &plugin->insert_peerstoredata);
+ sql_prepare (plugin->dbh,
+ "SELECT * FROM peerstoredata" " WHERE sub_system = ?",
+ &plugin->select_peerstoredata);
+ sql_prepare (plugin->dbh,
+ "SELECT * FROM peerstoredata" " WHERE sub_system = ?"
+ " AND peer_id = ?", &plugin->select_peerstoredata_by_pid);
+ sql_prepare (plugin->dbh,
+ "SELECT * FROM peerstoredata" " WHERE sub_system = ?"
+ " AND key = ?", &plugin->select_peerstoredata_by_key);
+ sql_prepare (plugin->dbh,
+ "SELECT * FROM peerstoredata" " WHERE sub_system = ?"
+ " AND peer_id = ?" " AND key = ?",
+ &plugin->select_peerstoredata_by_all);
+ sql_prepare (plugin->dbh,
+ "DELETE FROM peerstoredata" " WHERE UINT64_LT(expiry, ?)",
+ &plugin->expire_peerstoredata);
+ sql_prepare (plugin->dbh,
+ "DELETE FROM peerstoredata" " WHERE sub_system = ?"
+ " AND peer_id = ?" " AND key = ?",
+ &plugin->delete_peerstoredata);