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:
parent
2e77e4dc0b
commit
22614432a9
9 changed files with 141 additions and 36 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue