bool db_open_batch_connexion(JCR *jcr, B_DB *mdb);
char *db_strerror(B_DB *mdb);
int db_int64_handler(void *ctx, int num_fields, char **row);
+int db_strtime_handler(void *ctx, int num_fields, char **row);
int db_list_handler(void *ctx, int num_fields, char **row);
void db_debug_print(JCR *jcr, FILE *fp);
int db_int_handler(void *ctx, int num_fields, char **row);
return 0;
}
+/*
+ * Called here to retrieve a btime from the database.
+ * The returned integer will be extended to 64 bit.
+ */
+int db_strtime_handler(void *ctx, int num_fields, char **row)
+{
+ db_int64_ctx *lctx = (db_int64_ctx *)ctx;
+
+ if (row[0]) {
+ lctx->value = str_to_utime(row[0]);
+ lctx->count++;
+ }
+ return 0;
+}
+
/*
* Use to build a comma separated list of values from a query. "10,20,30"
*/