A query builder and executer that works in well with node-mysql-helper (optional).
- Escape everything that can't be verified
- Only 1 dependancy node-mysql-helper which uses felixge's node-mysql and Q Promises.
- Full functioning queries (except subqueries)
- Works well with simplified helper library.
- Easy to understand syntax
- Portable query builder, can run on client-side (not that you would want to)
Need to Know
All fields must be enclosed with backticks like
`fieldname` (referring to the base table) OR prefixed with the table name
If you do not use
AS the results will always be returned as
Uppercase Mysql Reserved Words will automatically be recognized. If you want to enforce a string rather than a reserved word, you have two options:
- Do not have the string all uppercase
- Wrap the string in quotes (single or double)
//must configure the MysqlHelper before using node-mysql-queryvar MysqlHelper = ;var mysqlOptions =host: 'bessie.com'user: 'username'password: 'chicken'database: 'dbname';//pool 5 connectionsMysqlHelper;//now I can use node-mysql-queryvar Query = ;var query=; //or go right into .execute()query;
- Better documentation
- complex where statements
- having & grouping
- A lot more testing
- Subquery Support