Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
src: implement addaleax suggestions
  • Loading branch information
geeksilva97 committed Sep 28, 2025
commit 4f71c07d7f34d97535597574077f88f8fee9e33a
8 changes: 2 additions & 6 deletions src/node_sqlite.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1763,13 +1763,9 @@ void DatabaseSync::ApplyChangeset(const FunctionCallbackInfo<Value>& args) {

Local<Function> filterFunc = filterValue.As<Function>();

context.filterCallback =
[db, env, filterFunc](std::string_view item) -> bool {
context.filterCallback = [&](std::string_view item) -> bool {
Local<Value> argv[1];
if (!String::NewFromUtf8(env->isolate(),
item.data(),
NewStringType::kNormal,
static_cast<int>(item.size()))
if (!ToV8Value(env->context(), item, env->isolate())
.ToLocal(&argv[0])) {
db->SetIgnoreNextSQLiteError(true);
return false;
Expand Down
Loading