1
0
Fork 0
mirror of https://github.com/KingDuckZ/dindexer.git synced 2025-07-16 16:24:12 +00:00

Detect content type after scanning and save to DB.

This commit is contained in:
King_DuckZ 2016-02-22 19:44:48 +01:00
parent 2e77e4dc0b
commit 22614432a9
9 changed files with 141 additions and 36 deletions

View file

@ -97,11 +97,13 @@ namespace din {
uint32_t new_group_id;
{
auto id_res = conn.query("INSERT INTO \"sets\" "
"(\"desc\",\"type\",\"app_name\") "
"VALUES ($1, $2, $3) RETURNING \"id\";",
"(\"desc\",\"type\",\"app_name\""
",\"content_type\") "
"VALUES ($1, $2, $3, $4) RETURNING \"id\";",
parSetData.name,
std::string(1, parSetData.type),
parSignature
boost::string_ref(&parSetData.type, 1),
parSignature,
boost::string_ref(&parSetData.content_type, 1)
);
assert(id_res.size() == 1);
assert(id_res[0].size() == 1);