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

sql-template-strings

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sql-template-strings - npm Package Compare versions

Comparing version 2.0.4 to 2.1.0

.vscode/tasks.json

6

.vscode/launch.json

@@ -5,3 +5,3 @@ {

{
"name": "Launch",
"name": "Mocha",
"type": "node",

@@ -19,3 +19,3 @@ "request": "launch",

"env": {
"NODE_ENV": "development"
"NODE_ENV": "testing"
},

@@ -39,2 +39,2 @@ "externalConsole": false,

]
}
}

@@ -12,2 +12,7 @@

/**
* The SQL Statement for [Sequelize](https://www.npmjs.com/package/sequelize)
*/
query: string
/**
* The SQL Statement for [mysql](https://www.npmjs.com/package/mysql)

@@ -14,0 +19,0 @@ */

@@ -14,2 +14,7 @@ 'use strict'

/** Returns the SQL Statement for Sequelize */
get query() {
return this.sql
}
/** Returns the SQL Statement for node-postgres */

@@ -16,0 +21,0 @@ get text() {

{
"name": "sql-template-strings",
"version": "2.0.4",
"version": "2.1.0",
"description": "ES6 tagged template strings for prepared statements with mysql and postgres",

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

@@ -9,3 +9,4 @@ [![Version](https://img.shields.io/npm/v/sql-template-strings.svg?maxAge=2592000)](https://www.npmjs.com/package/sql-template-strings)

A simple yet powerful module to allow you to use ES6 tagged template strings for prepared/escaped statements in [mysql](https://www.npmjs.com/package/mysql) / [mysql2](https://www.npmjs.com/package/mysql2) and [postgres](https://www.npmjs.com/package/pg).
A simple yet powerful module to allow you to use ES6 tagged template strings for prepared/escaped statements.
Works with [mysql](https://www.npmjs.com/package/mysql), [mysql2](https://www.npmjs.com/package/mysql2), [postgres](https://www.npmjs.com/package/pg) and [sequelize](https://www.npmjs.com/package/sequelize).

@@ -12,0 +13,0 @@ Example for escaping queries (callbacks omitted):

@@ -41,2 +41,8 @@ 'use strict'

it('should return the same as sql for query for sequelize', () => {
const value = 123
const statement = SQL`SELECT * FROM table WHERE column = ${value}`
assert.equal(statement.query, statement.sql)
})
describe('append()', () => {

@@ -43,0 +49,0 @@

Sorry, the diff of this file is not supported yet

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