File tree 2 files changed +6
-2
lines changed
2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,9 @@ var pathToText = function(path, isString) {
19
19
}
20
20
return text ;
21
21
}
22
+ var convertDotNotation = function ( path , pathDotNotation ) {
23
+ return pathToText ( [ path ] . concat ( pathDotNotation . split ( '.' ) ) , true ) ;
24
+ }
22
25
23
26
// These are the simple operators.
24
27
var ops = {
@@ -92,4 +95,5 @@ var convert = function (path, query) {
92
95
93
96
module . exports = function ( fieldName , query ) {
94
97
return convert ( [ fieldName ] , query ) ;
95
- } ;
98
+ } ;
99
+ module . exports . convertDotNotation = convertDotNotation
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " mongo-query-to-postgres-jsonb" ,
3
- "version" : " 0.1.1 " ,
3
+ "version" : " 0.1.2 " ,
4
4
"description" : " Converts MongoDB queries to postgresql queries for jsonb fields." ,
5
5
"main" : " index.js" ,
6
6
"directories" : {
You can’t perform that action at this time.
0 commit comments