"path TEXT, "
"pkg INTEGER, "
"size INTEGER, "
- "type INTEGER, "
"config INTEGER, "
"datafile INTEGER, "
"mode INTEGER, "
goto END;
}
- const char* sql = "INSERT INTO files(pkg, path, size, type, config, datafile, mode, "
- "user, 'group', hash1, ctime, mtime, capabilities) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
+ const char* sql = "INSERT INTO files(pkg, path, size, config, datafile, mode, "
+ "user, 'group', hash1, ctime, mtime, capabilities) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
// Prepare the statement
r = sqlite3_prepare_v2(db->handle, sql, -1, &stmt, NULL);
goto END;
}
- // Bind type - XXX this is char which isn't very helpful
- //char type = pakfire_file_get_type(file);
-
- r = sqlite3_bind_null(stmt, 4);
- if (r) {
- ERROR(db->pakfire, "Could not bind type: %s\n", sqlite3_errmsg(db->handle));
- pakfire_file_unref(file);
- goto END;
- }
-
// Bind config - XXX TODO
- r = sqlite3_bind_null(stmt, 5);
+ r = sqlite3_bind_null(stmt, 4);
if (r) {
ERROR(db->pakfire, "Could not bind config: %s\n", sqlite3_errmsg(db->handle));
pakfire_file_unref(file);
}
// Bind datafile - XXX TODO
- r = sqlite3_bind_null(stmt, 6);
+ r = sqlite3_bind_null(stmt, 5);
if (r) {
ERROR(db->pakfire, "Could not bind datafile: %s\n", sqlite3_errmsg(db->handle));
pakfire_file_unref(file);
// Bind mode
mode_t mode = pakfire_file_get_mode(file);
- r = sqlite3_bind_int64(stmt, 7, mode);
+ r = sqlite3_bind_int64(stmt, 6, mode);
if (r) {
ERROR(db->pakfire, "Could not bind mode: %s\n", sqlite3_errmsg(db->handle));
pakfire_file_unref(file);
// Bind user
const char* user = pakfire_file_get_user(file);
- r = sqlite3_bind_text(stmt, 8, user, -1, NULL);
+ r = sqlite3_bind_text(stmt, 7, user, -1, NULL);
if (r) {
ERROR(db->pakfire, "Could not bind user: %s\n", sqlite3_errmsg(db->handle));
pakfire_file_unref(file);
// Bind group
const char* group = pakfire_file_get_group(file);
- r = sqlite3_bind_text(stmt, 9, group, -1, NULL);
+ r = sqlite3_bind_text(stmt, 8, group, -1, NULL);
if (r) {
ERROR(db->pakfire, "Could not bind group: %s\n", sqlite3_errmsg(db->handle));
pakfire_file_unref(file);
// Bind hash1
const char* chksum = pakfire_file_get_chksum(file);
- r = sqlite3_bind_text(stmt, 10, chksum, -1, NULL);
+ r = sqlite3_bind_text(stmt, 9, chksum, -1, NULL);
if (r) {
ERROR(db->pakfire, "Could not bind hash1: %s\n", sqlite3_errmsg(db->handle));
pakfire_file_unref(file);
// Bind ctime
time_t ctime = pakfire_file_get_ctime(file);
- r = sqlite3_bind_int64(stmt, 11, ctime);
+ r = sqlite3_bind_int64(stmt, 10, ctime);
if (r) {
ERROR(db->pakfire, "Could not bind ctime: %s\n", sqlite3_errmsg(db->handle));
pakfire_file_unref(file);
// Bind mtime
time_t mtime = pakfire_file_get_mtime(file);
- r = sqlite3_bind_int64(stmt, 12, mtime);
+ r = sqlite3_bind_int64(stmt, 11, mtime);
if (r) {
ERROR(db->pakfire, "Could not bind mtime: %s\n", sqlite3_errmsg(db->handle));
pakfire_file_unref(file);
}
// Bind capabilities - XXX TODO
- r = sqlite3_bind_null(stmt, 13);
+ r = sqlite3_bind_null(stmt, 12);
if (r) {
ERROR(db->pakfire, "Could not bind capabilities: %s\n", sqlite3_errmsg(db->handle));
pakfire_file_unref(file);