#define DB_FIELD_TAG_NAME "name"
#define DB_FIELD_TAG_MEDIA_COUNT "media_count"
-/* DB field for bookmark */
-#define DB_FIELD_BOOKMARK_ID "bookmark_id"
-#define DB_FIELD_BOOKMARK_MARKED_TIME "marked_time"
-#define DB_FIELD_BOOKMARK_NAME "name"
-
/* DB field for Storage*/
#define DB_FIELD_STORAGE_ID "storage_uuid"
#define DB_FIELD_STORAGE_PATH "storage_path"
-/* DB field for Face */
-#define DB_FIELD_FACE_ID "face_id"
-#define DB_FIELD_FACE_TAG "face_tag"
-
/* DB Query Keyword */
#define QUERY_KEYWORD_AND "AND"
#define QUERY_KEYWORD_OR "OR"
#define UPDATE_PLAYLIST_ORDER_FROM_PLAYLIST_MAP "UPDATE "DB_TABLE_PLAYLIST_MAP" SET play_order=%d WHERE playlist_id=%d AND _id=%d;"
/* Bookmark */
-#define INSERT_BOOKMARK_TO_BOOKMARK "INSERT INTO "DB_TABLE_BOOKMARK" (media_uuid, marked_time, thumbnail_path, name) VALUES ('%q', '%d', %Q, %Q)"
+#define INSERT_BOOKMARK_TO_BOOKMARK "INSERT INTO "DB_TABLE_BOOKMARK" (media_uuid, bookmark_marked_time, thumbnail_path, bookmark_name) VALUES ('%q', '%d', %Q, %Q)"
#define SELECT_BOOKMARK_COUNT_BY_MEDIA_ID "SELECT COUNT(*) FROM "BOOKMARK_MEDIA_JOIN" AND b.media_uuid='%s'"
-#define SELECT_BOOKMARK_LIST "SELECT bookmark_id, b.media_uuid, marked_time, b.thumbnail_path, name FROM "BOOKMARK_MEDIA_JOIN
-#define SELECT_BOOKMARK_LIST_BY_MEDIA_ID "SELECT bookmark_id, b.media_uuid, marked_time, b.thumbnail_path, name FROM "BOOKMARK_MEDIA_JOIN" AND b.media_uuid='%s'"
-#define SELECT_BOOKMARK_ID_FROM_BOOKMARK "SELECT bookmark_id FROM "DB_TABLE_BOOKMARK" WHERE media_uuid='%s' AND marked_time=%d"
+#define SELECT_BOOKMARK_LIST "SELECT bookmark_id, b.media_uuid, bookmark_marked_time, b.thumbnail_path, bookmark_name FROM "BOOKMARK_MEDIA_JOIN
+#define SELECT_BOOKMARK_LIST_BY_MEDIA_ID "SELECT bookmark_id, b.media_uuid, bookmark_marked_time, b.thumbnail_path, bookmark_name FROM "BOOKMARK_MEDIA_JOIN" AND b.media_uuid='%s'"
+#define SELECT_BOOKMARK_ID_FROM_BOOKMARK "SELECT bookmark_id FROM "DB_TABLE_BOOKMARK" WHERE media_uuid='%s' AND bookmark_marked_time=%d"
-#define UPDATE_BOOKMARK_FROM_BOOKMARK "UPDATE "DB_TABLE_BOOKMARK" SET name=%Q WHERE bookmark_id=%d;"
+#define UPDATE_BOOKMARK_FROM_BOOKMARK "UPDATE "DB_TABLE_BOOKMARK" SET bookmark_name=%Q WHERE bookmark_id=%d;"
/* Update Meta*/
#define UPDATE_IMAGE_META_FROM_MEDIA "UPDATE '%s' SET orientation=%d WHERE media_uuid='%q'"
#define SELECT_STORAGE_INFO_FROM_STORAGE "SELECT storage_uuid, storage_path, storage_type FROM "DB_TABLE_STORAGE" WHERE validity=1 AND storage_uuid='%s'"
/* Face */
-#define DELETE_FACE_FROM_FACE "DELETE FROM "DB_TABLE_FACE" WHERE face_id=%d"
-#define INSERT_FACE_TO_FACE "INSERT INTO "DB_TABLE_FACE" (media_uuid, face_rect_x , face_rect_y, face_rect_w, face_rect_h, orientation, face_tag) VALUES ('%q', %d, %d, %d, %d, %d, %Q);"
-#define UPDATE_FACE_TO_FACE "UPDATE "DB_TABLE_FACE" SET face_rect_x=%d, face_rect_y=%d, face_rect_w=%d, face_rect_h=%d, orientation=%d, face_tag=%Q WHERE face_id=%d"
+#define DELETE_FACE_FROM_FACE "DELETE FROM "DB_TABLE_FACE" WHERE media_face_id=%d"
+#define INSERT_FACE_TO_FACE "INSERT INTO "DB_TABLE_FACE" (media_uuid, face_rect_x , face_rect_y, face_rect_w, face_rect_h, orientation, media_face_tag) VALUES ('%q', %d, %d, %d, %d, %d, %Q);"
+#define UPDATE_FACE_TO_FACE "UPDATE "DB_TABLE_FACE" SET face_rect_x=%d, face_rect_y=%d, face_rect_w=%d, face_rect_h=%d, orientation=%d, media_face_tag=%Q WHERE media_face_id=%d"
#define SELECT_MEDIA_COUNT_FROM_MEDIA_BY_ID "SELECT COUNT(*) FROM "DB_VIEW_MEDIA" WHERE media_uuid='%q' AND validity=1"
#define SELECT_FACE_COUNT "SELECT COUNT(*) FROM "FACE_MEDIA_JOIN
#define SELECT_FACE_COUNT_BY_MEDIA_ID "SELECT COUNT(*) FROM "FACE_MEDIA_JOIN" AND fa.media_uuid='%s'"
-#define SELECT_FACE_LIST "SELECT face_id, fa.media_uuid, face_rect_x, face_rect_y, face_rect_w, face_rect_h, fa.orientation, face_tag FROM "FACE_MEDIA_JOIN
-#define SELECT_FACE_LIST_BY_MEDIA_ID "SELECT face_id, fa.media_uuid, face_rect_x, face_rect_y, face_rect_w, face_rect_h, fa.orientation, face_tag FROM "FACE_MEDIA_JOIN" AND fa.media_uuid='%s'"
-#define UPDATE_MEDIA_INFO_IN_FACE_SCAN_LIST "UPDATE "DB_TABLE_FACE_SCAN_LIST" SET modified_time = 0 WHERE media_uuid IN (SELECT media_uuid FROM "DB_TABLE_FACE" WHERE face_id=%d)"
-#define SELECT_FACE_ID "SELECT face_id FROM "DB_TABLE_FACE" WHERE media_uuid='%q' AND face_rect_x=%d AND face_rect_y=%d AND face_rect_w=%d AND face_rect_h=%d AND orientation=%d"
+#define SELECT_FACE_LIST "SELECT media_face_id, fa.media_uuid, face_rect_x, face_rect_y, face_rect_w, face_rect_h, fa.orientation, media_face_tag FROM "FACE_MEDIA_JOIN
+#define SELECT_FACE_LIST_BY_MEDIA_ID "SELECT media_face_id, fa.media_uuid, face_rect_x, face_rect_y, face_rect_w, face_rect_h, fa.orientation, media_face_tag FROM "FACE_MEDIA_JOIN" AND fa.media_uuid='%s'"
+#define UPDATE_MEDIA_INFO_IN_FACE_SCAN_LIST "UPDATE "DB_TABLE_FACE_SCAN_LIST" SET modified_time = 0 WHERE media_uuid IN (SELECT media_uuid FROM "DB_TABLE_FACE" WHERE media_face_id=%d)"
+#define SELECT_FACE_ID "SELECT media_face_id FROM "DB_TABLE_FACE" WHERE media_uuid='%q' AND face_rect_x=%d AND face_rect_y=%d AND face_rect_w=%d AND face_rect_h=%d AND orientation=%d"
int _content_query_prepare(sqlite3_stmt **stmt, char *select_query, char *condition_query, char *option_query);
int _content_error_capi(int type, int cotent_error);