Skip to content

Commit

Permalink
sqlite: allow different select target
Browse files Browse the repository at this point in the history
  • Loading branch information
lmangani committed Jul 4, 2024
1 parent 1352785 commit eb861c9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion plugins/filters/sqlite/filter_sqlite.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ FilterSqlite.prototype.process = function(raw) {
const row = this.db.prepare(this.query).get(this.filter);
if (!row) this.emit('output', raw);
else {
raw[this.target_field] = row[this.target_field];
raw[this.target_field] = Object.values(row)[0];
this.emit('output', raw);
}

Expand Down
2 changes: 1 addition & 1 deletion plugins/filters/sqlite/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pastash/filter_sqlite",
"version": "1.1.0",
"version": "1.1.1",
"description": "SQLite Filter Plugin for @pastash/pastash",
"main": "filter_sqlite.js",
"scripts": {
Expand Down

0 comments on commit eb861c9

Please sign in to comment.