From 43bc2cac7b5cc11b14acb1b1f4f576e9cd414dc3 Mon Sep 17 00:00:00 2001 From: jeromew Date: Thu, 14 Mar 2019 17:49:55 +0000 Subject: [PATCH] Use strict (ported from CartoDB's fork) --- copy-to.js | 2 ++ index.js | 2 ++ test/binary.js | 6 ++++-- test/copy-from.js | 2 ++ test/copy-to.js | 2 ++ test/index.js | 2 ++ 6 files changed, 14 insertions(+), 2 deletions(-) diff --git a/copy-to.js b/copy-to.js index a45ee6e..f078713 100644 --- a/copy-to.js +++ b/copy-to.js @@ -1,3 +1,5 @@ +'use strict'; + module.exports = function(txt, options) { return new CopyStreamQuery(txt, options) } diff --git a/index.js b/index.js index ccac224..c1b23f1 100644 --- a/index.js +++ b/index.js @@ -1,3 +1,5 @@ +'use strict'; + var CopyToQueryStream = require('./copy-to') module.exports = { to: function(txt, options) { diff --git a/test/binary.js b/test/binary.js index a20366e..700c11d 100644 --- a/test/binary.js +++ b/test/binary.js @@ -1,3 +1,5 @@ +'use strict'; + var assert = require('assert') var gonna = require('gonna') @@ -19,7 +21,7 @@ var testBinaryCopy = function() { var fromClient = client() var toClient = client() - queries = [ + var queries = [ 'DROP TABLE IF EXISTS data', 'CREATE TABLE IF NOT EXISTS data (num BIGINT, word TEXT)', 'INSERT INTO data (num, word) VALUES (1, \'hello\'), (2, \'other thing\'), (3, \'goodbye\')', @@ -33,7 +35,7 @@ var testBinaryCopy = function() { var fromStream = fromClient.query(to('COPY (SELECT * FROM data) TO STDOUT BINARY')) var toStream = toClient.query(from('COPY data_copy FROM STDIN BINARY')) - runStream = function(callback) { + var runStream = function(callback) { fromStream.on('error', callback) toStream.on('error', callback) toStream.on('finish', callback) diff --git a/test/copy-from.js b/test/copy-from.js index 1765ca5..173ce15 100644 --- a/test/copy-from.js +++ b/test/copy-from.js @@ -1,3 +1,5 @@ +'use strict'; + var assert = require('assert') var gonna = require('gonna') diff --git a/test/copy-to.js b/test/copy-to.js index 50bd7c8..d148932 100644 --- a/test/copy-to.js +++ b/test/copy-to.js @@ -1,3 +1,5 @@ +'use strict'; + var assert = require('assert') var gonna = require('gonna') diff --git a/test/index.js b/test/index.js index 0985e40..a2324ff 100644 --- a/test/index.js +++ b/test/index.js @@ -1,3 +1,5 @@ +'use strict'; + require('./copy-from') require('./copy-to') require('./binary')