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

sqb

Package Overview
Dependencies
Maintainers
1
Versions
174
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sqb - npm Package Compare versions

Comparing version 0.0.10 to 0.0.11

2

lib/core/insert.js

@@ -47,3 +47,3 @@ /* SQB.js

if (!table) return this;
this._table = table instanceof Table || table.isRaw ? table : new Table(String(table));
this._table = table.isRaw ? table : new Table(String(table));
return this;

@@ -50,0 +50,0 @@ }

@@ -15,6 +15,34 @@ /* SQB.js

constructor(config){
constructor(config) {
super(config);
this.dialect = 'oracle';
}
/**
* Serialize Select statement
*
* @param {Select} obj Select statement object
* @return {String}
* @protected
*/
_serializeSelect(obj) {
let sql = super._serializeSelect(obj);
if (obj._limit || obj._offset) {
sql =
'select * from (select rownum row$number, t.* from (' +
(this.prettyPrint ? '\n ' : '') +
sql +
(this.prettyPrint ? '\n ' : '') +
') t) ' +
(obj._alias ? obj._alias+' ': '')+
(this.prettyPrint ? '\n' : '') +
'where ';
if (obj._offset)
sql += ' and row$number >= ' + obj._offset;
if (obj._limit)
sql += (obj._offset ? ' and ': ' ') + 'row$number <= ' + obj._limit;
}
return sql;
}
_serializeTablesNames(tables) {

@@ -21,0 +49,0 @@ let s = super._serializeTablesNames(tables);

@@ -36,3 +36,3 @@ /* SQB.js

// We build a new map of upper keys for case insensitivity
let values = config.params && typeof config.params === 'object' ? config.params: {},
let values = config.params && typeof config.params === 'object' ? config.params : {},
obj = {};

@@ -134,3 +134,3 @@ Object.getOwnPropertyNames(values).forEach(

if (obj._table.type === 'raw')
sb.append(this._serializeRaw(obj._table));
sb.append(this._serializeRaw(obj._table) + ' ');
else if (obj._table.type === 'table')

@@ -137,0 +137,0 @@ sb.append(this._serializeTableName(obj._table) + ' ');

{
"name": "sqb",
"description": "Lightweight, multi-dialect SQL query builder for JavaScript",
"version": "0.0.10",
"version": "0.0.11",
"author": "Panates Ltd.",

@@ -6,0 +6,0 @@ "contributors": [

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