Socket
Socket
Sign inDemoInstall

objection

Package Overview
Dependencies
Maintainers
2
Versions
201
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

objection - npm Package Compare versions

Comparing version 2.0.7 to 2.0.8

2

lib/model/modelValues.js

@@ -107,2 +107,4 @@ 'use strict';

return 'undefined';
} else if (Buffer.isBuffer(value)) {
return value.toString('hex')
} else if (isObject(value)) {

@@ -109,0 +111,0 @@ return JSON.stringify(value);

6

lib/queryBuilder/operations/InsertOperation.js

@@ -6,3 +6,3 @@ 'use strict';

const { after, mapAfterAllReturn } = require('../../utils/promiseUtils');
const { isPostgres, isSqlite, isMySql } = require('../../utils/knexUtils');
const { isPostgres, isSqlite, isMySql, isMsSql } = require('../../utils/knexUtils');
const { isObject } = require('../../utils/objectUtils');

@@ -31,4 +31,4 @@

async onBefore2(builder, result) {
if (this.models.length > 1 && !isPostgres(builder.knex())) {
throw new Error('batch insert only works with Postgresql');
if (this.models.length > 1 && !isPostgres(builder.knex()) && !isMsSql(builder.knex())) {
throw new Error('batch insert only works with Postgresql and SQL Server');
} else {

@@ -35,0 +35,0 @@ await callBeforeInsert(builder, this.models);

@@ -222,3 +222,3 @@ 'use strict';

function getValue(value) {
if (isObject(value) && value.toString !== Object.prototype.toString) {
if (isObject(value) && !Buffer.isBuffer(value) && value.toString !== Object.prototype.toString) {
return value.toString();

@@ -225,0 +225,0 @@ } else {

{
"name": "objection",
"version": "2.0.7",
"version": "2.0.8",
"description": "An SQL-friendly ORM for Node.js",

@@ -19,3 +19,3 @@ "main": "lib/objection.js",

"perf-opt": "mocha --slow 60000 --timeout 60000 --reporter spec --recursive perf --trace_opt --trace_deopt",
"prettier": "prettier --write \"{examples,lib,tests,typings}/**/*.{js,ts}\"",
"prettier": "prettier --write \"{examples,lib,tests,typings,doc}/**/*.{js,ts,md}\"",
"eslint": "eslint --format codeframe \"examples/**/*.js\" \"lib/**/*.js\" \"tests/**/*.js\"",

@@ -83,3 +83,3 @@ "docs:dev": "vuepress dev doc",

"husky": "^3.1.0",
"knex": "0.20.2",
"knex": "0.20.4",
"lint-staged": "^9.4.3",

@@ -92,3 +92,3 @@ "mocha": "^6.2.2",

"sqlite3": "^4.1.0",
"typescript": "^3.7.2",
"typescript": "^3.7.4",
"vuepress": "1.2.0"

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