sql2json
Advanced tools
Comparing version 1.6.2 to 1.6.3
const lexer = require('sql-parser').lexer; | ||
const postgisFunctions = /^(ST_SummaryStatsAgg|ST_value|st_transform|ST_Intersects|st_buffer|ST_AsGeoJson|ST_SetSRID|ST_GeomFromGeoJSON|ST_METADATA|ST_SUMMARYSTATS|ST_HISTOGRAM|TO_NUMBER|TO_CHAR|ST_GeoHash|first|last|ST_BANDMETADATA|st_centroid|round|trunc|abs|ceil|exp|floor|power|sqrt|acos|asin|atan|atan2|cos|cot|sin|tan|to_timestamp|ST_X|ST_Y|CF_[a-zA-Z0-9_-])$/gi; | ||
const postgisFunctions = /^(ST_SummaryStatsAgg|ST_value|st_valueCount|st_transform|ST_Intersects|st_buffer|ST_AsGeoJson|ST_SetSRID|ST_GeomFromGeoJSON|ST_METADATA|ST_SUMMARYSTATS|ST_HISTOGRAM|TO_NUMBER|TO_CHAR|ST_GeoHash|first|last|ST_BANDMETADATA|st_centroid|round|trunc|abs|ceil|exp|floor|power|sqrt|acos|asin|atan|atan2|cos|cot|sin|tan|to_timestamp|ST_X|ST_Y|CF_[a-zA-Z0-9_-])$/gi; | ||
const between = /^between$/gi; | ||
@@ -563,5 +563,5 @@ const sqlStatements = /^delete$/gi; | ||
const token = this.next(); | ||
switch (obtainType(token)) { | ||
case 'GROUP': | ||
@@ -571,3 +571,3 @@ case 'ORDER': | ||
case 'OFFSET': | ||
case 'EOF': | ||
case 'EOF': | ||
this.parsed.where = stack.pop(); | ||
@@ -664,3 +664,3 @@ this.index--; | ||
break; | ||
case 'LIMIT': | ||
@@ -701,4 +701,4 @@ case 'OFFSET': | ||
stack.push(el); | ||
} | ||
@@ -779,3 +779,3 @@ } | ||
case 'BY': | ||
break; | ||
break; | ||
case 'LIMIT': | ||
@@ -782,0 +782,0 @@ case 'OFFSET': |
{ | ||
"name": "sql2json", | ||
"version": "1.6.2", | ||
"version": "1.6.3", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is too big to display
153681