libmpm

morphux C package management library
Log | Files | Refs | Submodules | README | LICENSE | git clone https://git.ne02ptzero.me/git/libmpm

commit ac5938e5006d10ab7a96663ad64b7cc9f54af669
parent f65e2c2a20283225af8168639d8763d5ea12eb02
Author: Ne02ptzero <louis@ne02ptzero.me>
Date:   Wed,  8 Feb 2017 18:21:07 +0100

Fix(database.h): Temporary fix for database header file

Diffstat:
Minc/database.h | 24++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/inc/database.h b/inc/database.h @@ -24,33 +24,33 @@ # define DB_FN "test.db" # define SQL_CALLBACK_PTR(name) int (*name)(void *, int, char**, char**) # define SQL_CALLBACK_DEF(name) int name(void *context, int col_num, \ - char **col_txt, char **col_name) + char **col_txt, char **col_name) /* Package Search queries */ # define QUERY_GET_PACKAGE_BY_ID(id) "SELECT * FROM " PKG_TABLE \ - " WHERE id = %lld", id + " WHERE id = %lld", id # define QUERY_GET_PACKAGE_BY_NAME(name) "SELECT * FROM " PKG_TABLE \ - " WHERE name = \"%s\"", name + " WHERE name = \"%s\"", name /* File search queries */ -# define QUERY_GET_FILES_BY_ID(id) "SELECT * FROM " FILE_TABLE \ - " WHERE id = %lld", id +# define QUERY_GET_FILES_BY_ID(id) "SELECT * FROM " FILE_TABLE \ + " WHERE id = %lld", id # define QUERY_GET_FILES_BY_PATH(path) "SELECT * FROM " FILE_TABLE \ - " WHERE path = \"%s\"", path + " WHERE path = \"%s\"", path # define QUERY_GET_FILES_BY_PARENT_ID(id) "SELECT * FROM " FILE_TABLE \ - " WHERE parent = %lld", id + " WHERE parent = %lld", id # define QUERY_GET_FILES_BY_PARENT_NAME(name) "SELECT * FROM " FILE_TABLE \ - " WHERE parent_name = \"%s\"", \ - name + " WHERE parent_name = \"%s\"", \ + name /* TODO: type */ /* Category search queries */ -# define QUERY_GET_CATEG_BY_ID(id) "SELECT * FROM " CAT_TABLE \ - " WHERE id = %lld", id +# define QUERY_GET_CATEG_BY_ID(id) "SELECT * FROM " CAT_TABLE \ + " WHERE id = %lld", id # define SQL_CREATE_TABLE "CREATE table " # define SQL_INSERT_TABLE "INSERT INTO " -# define SQL_TYPE_PRIMARY_KEY " primary key " +# define SQL_TYPE_PRIMARY_KEY " primary key " # define SQL_TYPE_NOT_NULL " not null " # define SQL_TYPE_INT " integer " # define SQL_TYPE_TEXT " text "