|
1 | 1 | (function() {
|
2 | 2 | const password = '1234';
|
3 | 3 | sink(password); // NOT OK
|
4 |
| - |
| 4 | + |
5 | 5 | const s = JSON.stringify();
|
6 | 6 | sink(s); // NOT OK
|
7 | 7 | })();
|
8 | 8 |
|
9 | 9 | (async function() {
|
10 | 10 | const knex = require('knex');
|
11 |
| - |
| 11 | + |
12 | 12 | const users = knex().select('*').from('users');
|
13 | 13 | users.then(function (users) {
|
14 | 14 | sink(users); // NOT OK
|
|
23 | 23 |
|
24 | 24 | (function() {
|
25 | 25 | const pg = require('pg');
|
26 |
| - |
| 26 | + |
27 | 27 | const pool = new pg.Pool({});
|
28 | 28 | pool.connect(async function (err, client, done) {
|
29 | 29 | client.query('SELECT * FROM users', function (err, users) {
|
30 | 30 | sink(users);
|
31 | 31 | });
|
32 |
| - |
| 32 | + |
33 | 33 | const thenable = client.query('SELECT * FROM users')
|
34 | 34 | thenable.then(function(users) {
|
35 | 35 | sink(users); // NOT OK
|
|
79 | 79 | db.all('SELECT * FROM users', function (err, users) {
|
80 | 80 | sink(users); // NOT OK
|
81 | 81 | });
|
82 |
| - |
| 82 | + |
83 | 83 | const sqlitepromise = db.all('SELECT * FROM users');
|
84 | 84 |
|
85 | 85 | sink(await sqlitepromise); // NOT OK
|
|
100 | 100 | (async function () {
|
101 | 101 | const sql = require('mssql');
|
102 | 102 | await sql.connect('...');
|
103 |
| - |
| 103 | + |
104 | 104 | sql.query('SELECT * FROM users', function (err, users) {
|
105 | 105 | sink(users); // NOT OK
|
106 | 106 | });
|
107 | 107 |
|
108 | 108 | const mssqlthenable = sql.query('SELECT * FROM users');
|
109 |
| - |
| 109 | + |
110 | 110 | mssqlthenable.then(function (users) {
|
111 | 111 | sink(users); // NOT OK
|
112 | 112 | });
|
|
120 | 120 | })();
|
121 | 121 |
|
122 | 122 | (async function () {
|
123 |
| - const {Spanner} = require('@google-cloud/spanner'); |
| 123 | + const {Spanner, v1} = require('@google-cloud/spanner'); |
124 | 124 | const db = new Spanner({projectId: 'test'})
|
125 | 125 | .instance('instanceid')
|
126 | 126 | .database('databaseid');
|
|
131 | 131 |
|
132 | 132 | const [users] = (await db.executeSql('SELECT * FROM users', {}));
|
133 | 133 | sink(users); // NOT OK
|
134 |
| - |
| 134 | + |
135 | 135 | const spannerpromise = db.run({
|
136 | 136 | sql: 'SELECT * FROM users'
|
137 | 137 | });
|
|
144 | 144 | sink(rows); // NOT OK
|
145 | 145 | });
|
146 | 146 |
|
147 |
| - const client = new Spanner.v1.SpannerClient({}); |
| 147 | + const client = new v1.SpannerClient({}); |
148 | 148 | client.executeSql('SELECT * FROM users', {}, function (err, users) {
|
149 | 149 | sink(users); // NOT OK
|
150 | 150 | });
|
|
166 | 166 |
|
167 | 167 | (function () {
|
168 | 168 | const { MongoClient } = require('mongodb');
|
169 |
| - |
| 169 | + |
170 | 170 | MongoClient.connect('mongodb://localhost:1234', async function (err, db) {
|
171 | 171 | const collection = db.collection('users');
|
172 | 172 | const users = await collection.find({});
|
|
209 | 209 |
|
210 | 210 | (async function () {
|
211 | 211 | const { Collection } = require('marsdb');
|
212 |
| - |
| 212 | + |
213 | 213 | const doc = new Collection('users');
|
214 | 214 |
|
215 | 215 | const users = await doc.find({});
|
216 |
| - |
| 216 | + |
217 | 217 | sink(users); // NOT OK
|
218 | 218 | })();
|
219 | 219 |
|
|
0 commit comments