hediet / ts-typed-sql

A fully typed sql builder. Not maintained anymore, use it for your inspiration.
https://hediet.github.io/ts-typed-sql/
54 stars 4 forks source link

skipQuotingIfNotRequired is buggy #31

Closed phiresky closed 6 years ago

phiresky commented 6 years ago

.as("all") produces AS all which throws a SyntaxError at "all"

hediet commented 6 years ago

Is this due to all being a keyword? Which other keywords aren't allowed?

phiresky commented 6 years ago

probably yes. not sure, possibly all of https://www.postgresql.org/docs/current/static/sql-keywords-appendix.html ?

2018-01-10 14:10 GMT+01:00 Henning Dieterichs notifications@github.com:

Is this due to all being a keyword? Which other keywords aren't allowed?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/hediet/ts-typed-sql/issues/31#issuecomment-356597922, or mute the thread https://github.com/notifications/unsubscribe-auth/ACMnYfS62QNDD-issTMXv_tE5sDfUp3Vks5tJLbPgaJpZM4RQCtF .

phiresky commented 6 years ago

full example: select * from (select 1) as all;

hediet commented 6 years ago

Fixed in bad7ac6223c13d0f510c8d42c9c3bc0e9bd1736d. Hopefully, that fix is not bad :D