Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

node-querybuilder

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-querybuilder - npm Package Versions

12

0.11.0

Diff

kylefarris
published 0.10.0 •

kylefarris
published 0.9.1 •

kylefarris
published 0.9.0 •

Changelog

Source

v0.9.0 (2015-02-05)

  • Added this history file
  • Added the ability to do SELECT DISTINCT queries
  • We're doing better escaping of identifiers now
  • Added the ability to use table/view prefixes directly (ex. select * from users u)
  • Added the ability to do OR WHERE statements with or_where() method.
  • Added the ability to do LIKE statements directly (new methods: like(), not_like(), or_like(), or_not_like())
  • Restored ability to do WHERE IN(...) statements by passing an array as the second param to where()
  • Added the ability to do [OR] WHERE [NOT] IN(...) statements directly (new methods: where_in(), or_where_in(), where_not_in(), or_where_not_in())
  • Added the ability to do FROM statements directly for SELECT and DELETE queries (new method: from()) (ex. db.from('foo').get(() => ...))
  • Identifiers will now be properly escaped in JOIN statements.
  • Added the ability to call get_where() as a shorthand to get() and where() (ex. db.get_where('table',{foo: 'bar'},() => ...);)
  • Added the ability to call select_min(), select_max(), select_avg(), and select_sum().
  • Significanly improved security, helping to prevent SQL injection attacks.
  • Added ability to do OR HAVING statements with or_having() method
  • Added ability to add an offset directly without using the limit() method by using the offset() method.
  • Added ability to set SET values for updates and inserts using the set() method.
  • UPDATE statements now support ORDER BY clauses which can be added to the query using the order_by() method.
  • The update() method's 3rd parameter can now either be the callback (as always) or a WHERE clause (ex. 'foo = "bar"' or {foo:'bar', id: 3}). If a where clause is provided, the callback is now the 4th parameter. This change is fully backwards-compatible with the previous version of this module.
  • New package dependencies (for testing): chai and mocha.
  • Tests have been written for better-ensuring future enhancements and fixes to not break functionality
  • Library has been broken into 3 objects to allow for prpoer testing. This won't affect the API and is fully-backwards compatible with the previous version.
  • Officially announcing that how third parameter of the where() method works is deprecated... starting with v1.0.0, third param will be (bool) escape and not (bool) isRaw. So, all calls to this method using the 3rd parameter will, in future, have to be changed by converting true to false and vice versa. This is so that we have a consistent API throughout the library.
  • Name officially changed to node-mysql-querybuilder.
  • Author officially changed to Kyle Farris due to the substantial changes to this fork and Martin Tajur demoted to primary contributor (thanks for the great starting place Martin!!)
  • Name of internal methods and properties have been normalized to use the "lower_case" syntax.
  • Dependency for node-mysql upgraded to 2.5.
  • travis-ci functionality added to repository
  • Added public escape() method
  • Added funtional update_batch() method.
  • Added truncate() and empty_table() methods.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc