pgsql-ast-parser
Advanced tools
Comparing version 10.0.4 to 10.0.5
{ | ||
"name": "pgsql-ast-parser", | ||
"version": "10.0.4", | ||
"version": "10.0.5", | ||
"description": "Yet another simple Postgres SQL parser/modifier", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -198,3 +198,3 @@ // import { IType } from '../../interfaces'; | ||
ifExists?: boolean; | ||
cascade?: boolean; | ||
cascade?: 'cascade' | 'restrict'; | ||
} | ||
@@ -201,0 +201,0 @@ |
@@ -22,6 +22,13 @@ import 'mocha'; | ||
ifExists: true, | ||
cascade: true, | ||
cascade: 'cascade', | ||
}); | ||
checkStatement([`DROP TABLE IF EXISTS "Users" RESTRICT`], { | ||
type: 'drop table', | ||
name: { name: 'Users' }, | ||
ifExists: true, | ||
cascade: 'restrict', | ||
}); | ||
checkStatement([`drop index test`, `DROP INDEX"test"`], { | ||
@@ -28,0 +35,0 @@ type: 'drop index', |
@@ -629,3 +629,3 @@ import { IAstPartialMapper, AstDefaultMapper } from './ast-mapper'; | ||
if (val.cascade) { | ||
ret.push(' CASCADE '); | ||
ret.push(' ', val.cascade, ' '); | ||
} | ||
@@ -632,0 +632,0 @@ }, |
@@ -129,3 +129,3 @@ import { nil } from '../utils'; | ||
ifExists?: boolean; | ||
cascade?: boolean; | ||
cascade?: 'cascade' | 'restrict'; | ||
} | ||
@@ -132,0 +132,0 @@ export interface DropSequenceStatement extends PGNode { |
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
1594487
17293