Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set the SQL dialect in node-sql?

I am trying to include the node-sql module in a node.js project. It generates SQL statements from Javascript for mysql, postgresql and sqllite.

I have searched the documentation, but I does not explain how to set the dialect to generate SQL statements. Does anyone know how to achieve this?

like image 595
Jérôme Verstrynge Avatar asked Sep 03 '26 16:09

Jérôme Verstrynge


1 Answers

sql.setDialect('pg'); // Sets dialect for Postgres.

https://github.com/brianc/node-sql/blob/master/test/index-tests.js

like image 59
Brad Avatar answered Sep 05 '26 06:09

Brad