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

like-sql

Package Overview
Dependencies
Maintainers
0
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

like-sql - npm Package Compare versions

Comparing version 0.2.0 to 0.3.0

16

index.js

@@ -94,2 +94,10 @@ class LikeSQL {

if (this.type === 'rqlite') {
for (let i = 0; i < values.length; i++) {
if (Buffer.isBuffer(values[i])) {
values[i] = values[i].toString('hex')
}
}
}
const sql = `INSERT${ignore} INTO \`${table}\` (${cols}) VALUES (${placeholders})`

@@ -149,2 +157,10 @@

if (this.type === 'rqlite') {
for (let i = 0; i < values.length; i++) {
if (Buffer.isBuffer(values[i])) {
values[i] = values[i].toString('hex')
}
}
}
const sql = `UPDATE \`${table}\` SET ${set}${find}`

@@ -151,0 +167,0 @@

2

package.json
{
"name": "like-sql",
"version": "0.2.0",
"version": "0.3.0",
"description": "Simple SQL query builder",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -65,2 +65,5 @@ const tape = require('tape')

t.deepEqual(output2, ['INSERT OR IGNORE INTO `users` (`username`, `password`) VALUES (?, ?)', ['joe', '123']])
const output3 = builder.insert('files', { content: Buffer.from('Hello World!') })
t.deepEqual(output3, ['INSERT INTO `files` (`content`) VALUES (?)', [Buffer.from('Hello World!')]])
})

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