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

sql-bricks-sqlite

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sql-bricks-sqlite - npm Package Compare versions

Comparing version 0.1.0 to 1.0.0

6

package.json
{
"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 @@ );

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