imodel-native
imodel-native copied to clipboard
IECSqlBinder and ECSqlStatement are missing a BindIdSet function
Consider the ECSql: select id from IdSet(?)
Currently, there is no way in ECDb to bind an IdSet to an ECSql parameter using the IECSqlBinder or the ECSqlStatement directly. We do have a NativeECSqlBinder Api called BindIdSet, but that too is using a for loop to add array elements and bind ids individually, like so:
auto& binder = stmt->GetBinder(1);
for (const auto& id : idSet)
binder.AddArrayElement().BindId(id)
Expected:
DgnElementIdSet idSet;
auto& binder = stmt->GetBinder(1);
binder.BindIdSet(std::make_shared<DgnElementIdSet>(idSet));
Also,
DgnElementIdSet idSet;
stmt->BindIdSet(1, std::make_shared<DgnElementIdSet>(idSet));