New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

sqb-serializer-oracle

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sqb-serializer-oracle - npm Package Compare versions

Comparing version 0.0.6 to 0.0.7

5

package.json
{
"name": "sqb-serializer-oracle",
"description": "SQB serialization plugin for Oracle database",
"version": "0.0.6",
"version": "0.0.7",
"author": "Panates Ltd.",

@@ -25,2 +25,3 @@ "contributors": [

"eslint": "^3.19.0",
"eslint-config-google": "^0.7.1",
"istanbul": "^0.4.5",

@@ -30,3 +31,3 @@ "mocha": "^3.4.2"

"peerDependencies": {
"sqb": "^0.2.8"
"sqb": "^0.2.15"
},

@@ -33,0 +34,0 @@ "engines": {

3

README.md

@@ -9,2 +9,3 @@ # SQB-serializer-oracle

[![DevDependencies][devdependencies-image]][devdependencies-url]
[![PeerDependencies][peerdependencies-image]][peerdependencies-url]

@@ -32,1 +33,3 @@ SQB-serialization plugin for Oracle dialect

[devdependencies-url]:https://david-dm.org/panates/sqb-serializer-oracle?type=dev
[peerdependencies-image]: https://david-dm.org/panates/sqb-serializer-oracle/peer-status.svg
[peerdependencies-url]:https://david-dm.org/panates/sqb-serializer-oracle?type=peer

@@ -14,62 +14,65 @@ /* SQB Oracle Serializer Plugin

constructor(config) {
super(config);
this.dialect = 'oracle';
}
constructor(config) {
super(config);
this.dialect = 'oracle';
this.reservedWords = this.reservedWords.concat(['comment', 'dual']);
}
//noinspection JSUnusedGlobalSymbols
/**
* @override
*/
_serializeSelect(obj) {
let sql = super._serializeSelect(obj);
const prettyPrint = this.prettyPrint,
limit = obj._limit,
offset = obj._offset;
if (limit || offset) {
sql =
'select ' + (obj._alias ? obj._alias + '.' : '') + '* from (select rownum row$number, t.* from (' +
(prettyPrint ? '\n ' : '') +
sql +
(prettyPrint ? '\n' : '') +
') t)' + (obj._alias ? ' ' + obj._alias : '') +
(prettyPrint ? '\nwhere' : ' where') +
(offset ? ' row$number >= ' + offset : '') +
(limit ? (offset ? ' and' : '') + ' row$number <= ' + (limit + (offset || 0)) : '');
}
return sql;
//noinspection JSUnusedGlobalSymbols
/**
* @override
*/
_serializeSelect(obj) {
let sql = super._serializeSelect(obj);
const prettyPrint = this.prettyPrint;
const limit = obj._limit;
const offset = obj._offset;
if (limit || offset) {
sql =
'select ' + (obj._alias ? obj._alias + '.' : '') +
'* from (select rownum row$number, t.* from (' +
(prettyPrint ? '\n ' : '') +
sql +
(prettyPrint ? '\n' : '') +
') t)' + (obj._alias ? ' ' + obj._alias : '') +
(prettyPrint ? '\nwhere' : ' where') +
(offset ? ' row$number >= ' + offset : '') +
(limit ? (offset ? ' and' : '') + ' row$number <= ' +
(limit + (offset || 0)) : '');
}
return sql;
}
//noinspection JSUnusedGlobalSymbols
/**
* @override
*/
_serializeTablesNames(tables) {
return super._serializeTablesNames(tables) || 'from dual';
}
//noinspection JSUnusedGlobalSymbols
/**
* @override
*/
_serializeTablesNames(tables) {
return super._serializeTablesNames(tables) || 'dual';
}
//noinspection JSUnusedGlobalSymbols
/**
* @override
*/
_serializeCondition(item) {
let s = super._serializeCondition(item);
if (!item.isRaw) {
s = s.replace(/!= ?null/g, 'is not null')
.replace(/<> ?null/g, 'is not null')
.replace(/= ?null/g, 'is null');
}
return s;
//noinspection JSUnusedGlobalSymbols
/**
* @override
*/
_serializeCondition(item) {
let s = super._serializeCondition(item);
if (!item.isRaw) {
s = s.replace(/!= ?null/g, 'is not null')
.replace(/<> ?null/g, 'is not null')
.replace(/= ?null/g, 'is null');
}
return s;
}
//noinspection JSUnusedGlobalSymbols
/**
* @override
*/
_serializeDateValue(date) {
const s = super._serializeDateValue(date);
return s.length <= 12 ?
'to_date(' + s + ", 'yyyy-mm-dd')" :
'to_date(' + s + ", 'yyyy-mm-dd hh24:mi:ss')"
}
//noinspection JSUnusedGlobalSymbols
/**
* @override
*/
_serializeDateValue(date) {
const s = super._serializeDateValue(date);
return s.length <= 12 ?
'to_date(' + s + ', \'yyyy-mm-dd\')' :
'to_date(' + s + ', \'yyyy-mm-dd hh24:mi:ss\')';
}
}

@@ -76,0 +79,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