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 @@ |
{ | ||
"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 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
18762
318