UNPKG
json-sql-isme2n
Version:
latest (0.3.11)
0.3.11
node.js json to sql queries mapper
github.com/isme2n/json-sql
isme2n/json-sql
json-sql-isme2n
/
lib
/
dialects
/
postgresql
/
operators
/
fetching.js
11 lines
(9 loc)
•
240 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
'use strict'
;
module
.
exports
=
function
(
dialect
) { dialect.
operators
.
fetching
.
add
(
'$json'
, {
fn
:
function
(
value, end
) {
if
(end) value = {
value
: value};
return
dialect.
buildBlock
(
'term'
, {
term
: value,
type
:
'value'
}); } }); };