js-sql-parser
js-sql-parser copied to clipboard
allow [$:] as prefix and plain ? for prepared statements
This allows handling of the $-prefix (postgresql and sequelize bind), :-previx (PHP PDO and sequelize replace) and single ? (most DBS for prepared steatement. But this PR allows this placeholder on more positions than the underlaying databases, so its for people who need preapared-statement support and know what they do. I am not shure if this should go into master. Anyway it works for me and is out for now. By the way some trailing whitespace are stripped, so use git diff -w
hi @oger000 , thanks for the pr and sorry for the late reply.
There are two things need to be discussed:
- need support
?
and??
follows: https://github.com/mysqljs/mysql and https://github.com/go-sql-driver/mysql - i think placeholder should not be a
Identifier
in AST, or at least have a flag to label it out.