pgsql-ast-parser
Advanced tools
Comparing version 1.3.0 to 1.3.1
{ | ||
"name": "pgsql-ast-parser", | ||
"version": "1.3.0", | ||
"version": "1.3.1", | ||
"description": "Yet another simple Postgres SQL parser/modifier", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -206,4 +206,4 @@ import * as a from './syntax/ast'; | ||
createSequence(seq: a.CreateSequenceStatement): a.Statement | nil { | ||
if (seq.as) { | ||
this.dataType(seq.as); | ||
if (seq.options.as) { | ||
this.dataType(seq.options.as); | ||
} | ||
@@ -210,0 +210,0 @@ return seq; |
@@ -531,6 +531,7 @@ // import { IType } from '../../interfaces'; | ||
export interface CreateSequenceStatement extends QName, CreateSequenceOptions { | ||
export interface CreateSequenceStatement extends QName { | ||
type: 'create sequence'; | ||
temp?: boolean; | ||
ifNotExists?: boolean; | ||
options: CreateSequenceOptions; | ||
} | ||
@@ -537,0 +538,0 @@ |
@@ -13,10 +13,12 @@ import 'mocha'; | ||
schema: 'public', | ||
startWith: 1, | ||
incrementBy: 1, | ||
minValue: 'no minvalue', | ||
maxValue: 'no maxvalue', | ||
cache: 1, | ||
as: {type: 'bigint'}, | ||
cycle: 'cycle', | ||
ifNotExists: true, | ||
options: { | ||
startWith: 1, | ||
incrementBy: 1, | ||
minValue: 'no minvalue', | ||
maxValue: 'no maxvalue', | ||
cache: 1, | ||
as: { type: 'bigint' }, | ||
cycle: 'cycle', | ||
} | ||
}); | ||
@@ -29,6 +31,8 @@ | ||
temp: true, | ||
ownedBy: { | ||
table: 'tbl', | ||
column: 'col', | ||
} | ||
options: { | ||
ownedBy: { | ||
table: 'tbl', | ||
column: 'col', | ||
}, | ||
}, | ||
}); | ||
@@ -40,3 +44,5 @@ | ||
name: 'myseq', | ||
cycle: 'no cycle', | ||
options: { | ||
cycle: 'no cycle', | ||
}, | ||
}); | ||
@@ -47,3 +53,5 @@ | ||
name: 'myseq', | ||
cycle: 'cycle', | ||
options: { | ||
cycle: 'cycle', | ||
}, | ||
}); | ||
@@ -54,3 +62,5 @@ | ||
name: 'myseq', | ||
ownedBy: 'none', | ||
options: { | ||
ownedBy: 'none', | ||
}, | ||
}); | ||
@@ -57,0 +67,0 @@ |
@@ -397,3 +397,3 @@ import { IAstPartialMapper, AstDefaultMapper } from './ast-mapper'; | ||
visitQualifiedName(cs); | ||
visitSeqOpts(m, cs); | ||
visitSeqOpts(m, cs.options); | ||
}, | ||
@@ -400,0 +400,0 @@ |
@@ -372,6 +372,7 @@ import { nil } from '../utils'; | ||
}; | ||
export interface CreateSequenceStatement extends QName, CreateSequenceOptions { | ||
export interface CreateSequenceStatement extends QName { | ||
type: 'create sequence'; | ||
temp?: boolean; | ||
ifNotExists?: boolean; | ||
options: CreateSequenceOptions; | ||
} | ||
@@ -378,0 +379,0 @@ export interface CreateSequenceOptions { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
796777
8727