diff options
Diffstat (limited to 'src/sq/sq.c')
-rw-r--r-- | src/sq/sq.c | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/src/sq/sq.c b/src/sq/sq.c new file mode 100644 index 000000000..524014b0f --- /dev/null +++ b/src/sq/sq.c | |||
@@ -0,0 +1,68 @@ | |||
1 | /* | ||
2 | This file is part of GNUnet | ||
3 | Copyright (C) 2017 GNUnet e.V. | ||
4 | |||
5 | GNUnet is free software; you can redistribute it and/or modify it under the | ||
6 | terms of the GNU General Public License as published by the Free Software | ||
7 | Foundation; either version 3, or (at your option) any later version. | ||
8 | |||
9 | GNUnet is distributed in the hope that it will be useful, but WITHOUT ANY | ||
10 | WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR | ||
11 | A PARTICULAR PURPOSE. See the GNU General Public License for more details. | ||
12 | |||
13 | You should have received a copy of the GNU General Public License along with | ||
14 | GNUnet; see the file COPYING. If not, If not, see <http://www.gnu.org/licenses/> | ||
15 | */ | ||
16 | /** | ||
17 | * @file sq/sq.c | ||
18 | * @brief helper functions for Sqlite3 DB interactions | ||
19 | * @author Christian Grothoff | ||
20 | */ | ||
21 | #include "platform.h" | ||
22 | #include "gnunet_sq_lib.h" | ||
23 | |||
24 | |||
25 | /** | ||
26 | * Execute a prepared statement. | ||
27 | * | ||
28 | * @param db_conn database connection | ||
29 | * @param params parameters to the statement | ||
30 | * @return #GNUNET_OK on success, #GNUNET_SYSERR on error | ||
31 | */ | ||
32 | int | ||
33 | GNUNET_SQ_bind (sqlite3_stmt *stmt, | ||
34 | const struct GNUNET_SQ_QueryParam *params) | ||
35 | { | ||
36 | } | ||
37 | |||
38 | |||
39 | /** | ||
40 | * Extract results from a query result according to the given specification. | ||
41 | * | ||
42 | * @param result result to process | ||
43 | * @param[in,out] rs result specification to extract for | ||
44 | * @param row row from the result to extract | ||
45 | * @return | ||
46 | * #GNUNET_YES if all results could be extracted | ||
47 | * #GNUNET_SYSERR if a result was invalid (non-existing field) | ||
48 | */ | ||
49 | int | ||
50 | GNUNET_SQ_extract_result (sqlite3_stmt *result, | ||
51 | struct GNUNET_SQ_ResultSpec *rs, | ||
52 | int row) | ||
53 | { | ||
54 | } | ||
55 | |||
56 | |||
57 | /** | ||
58 | * Free all memory that was allocated in @a rs during | ||
59 | * #GNUNET_SQ_extract_result(). | ||
60 | * | ||
61 | * @param rs reult specification to clean up | ||
62 | */ | ||
63 | void | ||
64 | GNUNET_SQ_cleanup_result (struct GNUNET_SQ_ResultSpec *rs) | ||
65 | { | ||
66 | } | ||
67 | |||
68 | /* end of sq.c */ | ||