pgsql-ast-parser
Advanced tools
Comparing version 4.1.5 to 4.1.6
{ | ||
"name": "pgsql-ast-parser", | ||
"version": "4.1.5", | ||
"version": "4.1.6", | ||
"description": "Yet another simple Postgres SQL parser/modifier", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -227,2 +227,10 @@ | ||
# Parsing literal values | ||
Postgres implements several literal syntaxes (string-to-something converters), whiches parsers are exposed as helper functions by this pgsql-ast-parser: | ||
- `parseArrayLiteral()` parses arrays literals syntaxes (for instance `{a,b,c}`) | ||
- `parseGeometricLiteral()` parses [geometric types](https://www.postgresql.org/docs/current/datatype-geometric.html) (for instance, things like `(1,2)` or `<(1,2),3>`) | ||
- `parseIntervalLiteral()` parses [interval inputs](https://www.postgresql.org/docs/current/datatype-datetime.html#DATATYPE-INTERVAL-INPUT) literals (such as `P1Y2DT1H` or `1 yr 2 days 1 hr`) | ||
# Development | ||
@@ -229,0 +237,0 @@ |
@@ -12,3 +12,3 @@ import {compile} from 'moo'; | ||
hours: /(?:h|hrs?|hours?)\b/, | ||
minutes: /(?:m|mins?)\b/, | ||
minutes: /(?:m|mins?|minutes?)\b/, | ||
seconds: /(?:s|secs?|seconds?)\b/, | ||
@@ -15,0 +15,0 @@ milliseconds: /(?:ms|milliseconds?)\b/, |
@@ -89,3 +89,5 @@ import 'mocha'; | ||
checkInterval('1 year 40 days 1 minute', { years: 1, days: 40, minutes: 1 }); | ||
it('produces a string', () => { | ||
@@ -92,0 +94,0 @@ expect(intervalToString({ years: 1 })).to.equal('1 year'); |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
1118403
12208
249