launchql / pgsql-parser

PostgreSQL Query Parser for Node.js
MIT License
129 stars 23 forks source link

Implement TRUNCATE TABLE #83

Closed acarl005 closed 1 year ago

acarl005 commented 1 year ago

This PR implements TruncateStmt, and adds the truncate.sql fixture file to the tests.

pyramation commented 1 year ago

sorry, I think I did this in the wrong order. Let me try and import your commits and fix the conflicts.

pyramation commented 1 year ago

ok, not sure which one you wanted, here is the conflict:

<<<<<<< HEAD
    output.push(this.list(node.relations, ', ', '', 'truncate'));
=======
    output.push(node.relations.map((e) => this.deparse(e, 'truncate')).join(', '));
>>>>>>> truncatestmt
pyramation commented 1 year ago

@acarl005 btw — thank you for your awesome work! you're really improving the library!!! thank you :)