3 ms·
Agreed. A while ago I looked into hacking something like this into plv8. You'd be able to do something like: SELECT * FROM js_query('...'); Where the query is
by felixge 4y ago
Agreed. A while ago I looked into hacking something like this into plv8. You'd be able to do something like:
SELECT * FROM js_query('...');
Where the query is a JS snippet that has access to low level access methods, e.g.:
var results = [];
var cursor = myTable.indexes.foo.seek('item-23');
while (cursor.next()) {
results.push(cursor.row());
}
return results;
However, it turns out this would be a lot of work and it's difficult to make it work with features like row level security.
Since I didn't have enough time I dropped the idea, but it'd be awesome if somebody hacked this up at some point : ).