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

@dialexa/knex-plus

Package Overview
Dependencies
Maintainers
5
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dialexa/knex-plus - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

15

dist/repository.js

@@ -17,3 +17,7 @@ "use strict";

};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const lodash_get_1 = __importDefault(require("lodash.get"));
const change_case_1 = require("./change-case");

@@ -29,4 +33,11 @@ class Repository {

const cols = change_case_1.snakeCase(fields || "*");
const ids = yield this.qb.insert(obj);
const records = yield this.where({ id: ids }).select(cols);
let records = [];
const dialect = lodash_get_1.default(this.knex, ['client', 'config', 'dialect'], 'sqlite3');
if (dialect === 'sqlite3') {
const ids = yield this.qb.insert(obj);
records = yield this.where({ id: ids }).select(cols);
}
else {
records = yield this.qb.insert(obj, cols);
}
return change_case_1.camelCase(records);

@@ -33,0 +44,0 @@ });

3

package.json
{
"name": "@dialexa/knex-plus",
"version": "0.2.0",
"version": "0.2.1",
"description": "A lightweight repository library powered by knex",

@@ -49,2 +49,3 @@ "main": "dist/index.js",

"lodash.camelcase": "~4.3.0",
"lodash.get": "~4.4.2",
"lodash.mapkeys": "~4.6.0",

@@ -51,0 +52,0 @@ "lodash.snakecase": "~4.1.1"

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