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.1.0 to 0.2.0

2

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

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

@@ -26,20 +26,28 @@ /* SQB Oracle Serializer Plugin

const limit = this.statement._limit || 0;
const offset = obj._offset || 0;
const a = obj._alias;
const offset = Math.max((obj._offset || 0) - 1, 0);
if (limit || offset) {
const order = this.statement._orderby;
if (offset || (order && order.length)) {
out = 'select ' + (a ? a + '.' : '') + '* from (\n\t' +
'select /*+ first_rows(' + (limit || 100) +
') */ rownum row$number, t.* from (\n\t' +
out + '\n\b' +
') t' + (limit ? ' where rownum <= ' + (limit + offset - 1) : '') +
'\n\b)' + (a ? ' ' + a : '');
if (this.config.serverVersion >= 12) {
if (offset)
out += ' where row$number >= ' + (offset);
out += (offset ? '\nOFFSET ' + offset + ' ROWS' : '') +
(limit ? ' FETCH NEXT ' + limit + ' ROWS ONLY' : '');
else out += (limit ? '\nFETCH FIRST ' + limit + ' ROWS ONLY' : '');
} else {
out = 'select ' + (a ? a + '.' : '') + '* from (\n\t' +
out + '\n\b' +
') where rownum <= ' + limit;
const a = obj._alias;
const order = this.statement._orderby;
if (offset || (order && order.length)) {
out = 'select ' + (a ? a + '.' : '') + '* from (\n\t' +
'select /*+ first_rows(' + (limit || 100) +
') */ rownum row$number, t.* from (\n\t' +
out + '\n\b' +
') t' +
(limit ? ' where rownum <= ' + (limit + offset) : '') +
'\n\b)' + (a ? ' ' + a : '');
if (offset)
out += ' where row$number >= ' + (offset + 1);
} else {
out = 'select ' + (a ? a + '.' : '') + '* from (\n\t' +
out + '\n\b' +
') where rownum <= ' + limit;
}
}

@@ -46,0 +54,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