mirror of
https://github.com/matrix-construct/construct
synced 2024-12-26 07:23:53 +01:00
ircd:Ⓜ️:dbs: Conditional indexer; pass db::op from opts for indexer.
This commit is contained in:
parent
ed64a21872
commit
2b7358aa60
2 changed files with 3 additions and 2 deletions
|
@ -69,6 +69,7 @@ struct ircd::m::dbs::write_opts
|
|||
db::op op {db::op::SET};
|
||||
bool present {true};
|
||||
bool history {true};
|
||||
bool indexer {true};
|
||||
};
|
||||
|
||||
/// Database Schema Descriptors
|
||||
|
|
|
@ -115,11 +115,11 @@ ircd::m::dbs::write(db::txn &txn,
|
|||
"Cannot write to database: no index specified for event."
|
||||
};
|
||||
|
||||
db::txn::append
|
||||
if(opts.indexer) db::txn::append
|
||||
{
|
||||
txn, dbs::event_idx,
|
||||
{
|
||||
db::op::SET,
|
||||
opts.op,
|
||||
at<"event_id"_>(event),
|
||||
byte_view<string_view>(opts.idx)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue