Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added functionality #9

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open

added functionality #9

wants to merge 11 commits into from

Conversation

pyramation
Copy link

It’s not complete, but has a lot more functionality than before. I implemented

CreateStmt
ConstraintStmt
Constraint
ReferenceConstraint
ExclusionConstraint
FunctionParameter
CreateFunctionStmt
CreateSchemaStmt
TransactionStmt

On a high level you can now

  • create basic functions that return types, returns table, returns trigger, and setoff.
  • create tables with check, defaults, exclude, foreign key, nulls, unique constraints, including basic on delete, on update

Limitations

  • ON UPDATE and ON DELETE only have RESTRICT and CASCADE (should be easy to add more)
  • TransactionStmt is limited to BEGIN and COMMIT (needs ROLLBACK, etc)
  • Although the cases I tested work (even passing check() in test.js), there are some tests not passing from the upstream. I think we need to implement a few more items like TEMP tables, INHERITS, etc., for those to pass.

this could possibly help close #8

@pyramation
Copy link
Author

@zhm I'd love to see this go in master ;) we're passing now, cheers!

@mitar
Copy link

mitar commented Aug 18, 2019

There are some merge conflicts now, care to address them?

@ReinsBrain
Copy link

@zhm I'd love to see this go in master ;) we're passing now, cheers!

@pyramation - this could be merge-able if you could fix the conflicts. This package is pretty awesome and I hope we could keep it moving forward if possible.

@pyramation
Copy link
Author

@zhm I'd love to see this go in master ;) we're passing now, cheers!

@pyramation - this could be merge-able if you could fix the conflicts. This package is pretty awesome and I hope we could keep it moving forward if possible.

@ReinsBrain I've moved all development over to https://github.com/pyramation/pgsql-parser which is much more maintained and active

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deparse Create Statements
3 participants