]> pd.if.org Git - zpackage/blobdiff - zpm.h
add function to return one string column
[zpackage] / zpm.h
diff --git a/zpm.h b/zpm.h
index 6b8b469c544b4398dc52f61a0e9772ddd4057462..64e5ac63ec9c49437cc2b4da2310111aa724d85c 100644 (file)
--- a/zpm.h
+++ b/zpm.h
@@ -5,6 +5,7 @@
 #include <stdio.h>
 #include <time.h>
 #include <limits.h>
+#include <stdarg.h>
 
 #include <sqlite3.h>
 
@@ -31,6 +32,8 @@ struct zpm {
        sqlite3 *db;
        char *path; /* path to db file */
        int error;
+       int dbresult;
+       char *dberrmsg;
        char *errmsg;
        char *pkgid;
        struct zpm_package *current_package;
@@ -169,13 +172,18 @@ int zpm_addvercmp(struct zpm *pkg);
 
 int zpm_exec(struct zpm *z, const char *sql, int(*callback)(void *, int, char **, char**), void *arg, char **errmsg);
 
-int zpm_foreach_path(struct zpm *zpm, char *pkgid, 
+int zpm_foreach_path(struct zpm *zpm, char *pkgid, char *where,
 int (*callback)(void *f, int ncols, char **vals, char **cols),
 void *data, char **errmsg);
 
 int zpm_script_hash(struct zpm *zpm, char *pkgstr, char *phase, char *hash);
+int zpm_package_hash(struct zpm *zpm, char *pkgid, char *hash);
+int zpm_package_sethash(struct zpm *zpm, char *pkgid, char *hash);
 
+sqlite3_stmt *zpm_dbqueryv(struct zpm *zpm, char *query, va_list args);
 sqlite3_stmt *zpm_dbquery(struct zpm *zpm, char *query, ...);
+char *zpm_db_string(struct zpm *zpm, char *query, ...);
+
 struct zpm *zpm_clearmem(struct zpm *zpm);
 
 #endif