Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: oguimbal/pgsql-ast-parser
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 10.5.0
Choose a base ref
...
head repository: oguimbal/pgsql-ast-parser
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 10.5.1
Choose a head ref
  • 2 commits
  • 5 files changed
  • 1 contributor

Commits on Jun 20, 2022

  1. fix

    oguimbal committed Jun 20, 2022
    Copy the full SHA
    0d9be3c View commit details
  2. Copy the full SHA
    27a779b View commit details
Showing with 5 additions and 3 deletions.
  1. +1 −0 .deno/syntax/ast.ts
  2. +1 −1 .deno/to-sql.ts
  3. +1 −1 package.json
  4. +1 −0 src/syntax/ast.ts
  5. +1 −1 src/to-sql.ts
1 change: 1 addition & 0 deletions .deno/syntax/ast.ts
Original file line number Diff line number Diff line change
@@ -515,6 +515,7 @@ export interface ColumnConstraintSimple extends PGNode {

export interface ColumnConstraintReference extends TableReference, PGNode {
type: 'reference';
constraintName?: Name;
}

export interface ColumnConstraintDefault extends PGNode {
2 changes: 1 addition & 1 deletion .deno/to-sql.ts
Original file line number Diff line number Diff line change
@@ -642,7 +642,7 @@ const visitor = astVisitor<IAstFullVisitor>(m => ({
},

constraint: cst => {
if ('constraintName' in cst && cst.constraintName) {
if (cst.constraintName) {
ret.push(' CONSTRAINT ', name(cst.constraintName), ' ');
}
addConstraint(cst, m);
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pgsql-ast-parser",
"version": "10.5.0",
"version": "10.5.1",
"description": "Yet another simple Postgres SQL parser/modifier",
"main": "index.js",
"repository": "https://github.com/oguimbal/pgsql-ast-parser",
1 change: 1 addition & 0 deletions src/syntax/ast.ts
Original file line number Diff line number Diff line change
@@ -515,6 +515,7 @@ export interface ColumnConstraintSimple extends PGNode {

export interface ColumnConstraintReference extends TableReference, PGNode {
type: 'reference';
constraintName?: Name;
}

export interface ColumnConstraintDefault extends PGNode {
2 changes: 1 addition & 1 deletion src/to-sql.ts
Original file line number Diff line number Diff line change
@@ -642,7 +642,7 @@ const visitor = astVisitor<IAstFullVisitor>(m => ({
},

constraint: cst => {
if ('constraintName' in cst && cst.constraintName) {
if (cst.constraintName) {
ret.push(' CONSTRAINT ', name(cst.constraintName), ' ');
}
addConstraint(cst, m);