sql-bricks-sqlite
Advanced tools
Comparing version 0.1.0 to 1.0.0
{ | ||
"name": "sql-bricks-sqlite", | ||
"version": "0.1.0", | ||
"version": "1.0.0", | ||
"author": "Peter Rust <peter@cornerstonenw.com>", | ||
@@ -32,4 +32,4 @@ "description": "Transparent, Schemaless SQL Generation for the SQLite dialect", | ||
"dependencies": { | ||
"underscore": "1.4.x", | ||
"sql-bricks": "1.0.0-beta.2" | ||
"underscore": "^1.12.1", | ||
"sql-bricks": "^3.0.0" | ||
}, | ||
@@ -36,0 +36,0 @@ "devDependencies": { |
@@ -11,6 +11,7 @@ // SQLite extension for SQLBricks | ||
var Select = sql.select; | ||
var handleValue = sql._handleValue; | ||
// Insert & Update OR clauses (SQLite dialect) | ||
Update.defineClause('or', '{{#if _or}}OR {{_or}}{{/if}}', {after: 'update'}); | ||
Insert.defineClause('or', '{{#if _or}}OR {{_or}}{{/if}}', {after: 'insert'}); | ||
Update.defineClause('or', function(opts) { return this._or ? `OR ${this._or}` : '' }, {after: 'update'}); | ||
Insert.defineClause('or', function(opts) { return this._or ? `OR ${this._or}` : '' }, {after: 'insert'}); | ||
@@ -27,3 +28,2 @@ var or_methods = { | ||
// TODO: shouldn't LIMIT/OFFSET use handleValue()? Otherwise isn't it vulnerable to SQL Injection? | ||
Select.prototype.limit = function(val) { | ||
@@ -40,3 +40,3 @@ this._limit = val; | ||
'limit', | ||
'{{#ifNotNull _limit}}LIMIT {{_limit}}{{/ifNotNull}}', | ||
function(opts) { return this._limit != null ? `LIMIT ${handleValue(this._limit, opts)}` : '' }, | ||
{after: 'orderBy'} | ||
@@ -47,3 +47,3 @@ ); | ||
'offset', | ||
'{{#ifNotNull _offset}}OFFSET {{_offset}}{{/ifNotNull}}', | ||
function(opts) { return this._offset != null ? `OFFSET ${handleValue(this._offset, opts)}` : '' }, | ||
{after: 'limit'} | ||
@@ -50,0 +50,0 @@ ); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
4963
0
+ Addedsql-bricks@3.0.1(transitive)
+ Addedunderscore@1.13.7(transitive)
- Removedsql-bricks@1.0.0-beta.2(transitive)
- Removedunderscore@1.4.4(transitive)
Updatedsql-bricks@^3.0.0
Updatedunderscore@^1.12.1