@@ -22,8 +22,8 @@ Sorry the API documentation is not complete. There are tests in ./test/integrati
2222
2323
2424#Usage
25-
26- var sqlQuery = require(' sql-query') .Query();
25+ var sql = require('sql-query'),
26+ sqlQuery = sql.Query();
2727
2828##Create
2929
@@ -244,13 +244,13 @@ Sorry the API documentation is not complete. There are tests in ./test/integrati
244244
245245 sqlSelect
246246 .from('table1')
247- .where({ col: sqlQuery.Query .eq(null) })
247+ .where({ col: sql .eq(null) })
248248 .build();
249249 "SELECT * FROM `table1` WHERE `col` IS NULL"
250250
251251 sqlSelect
252252 .from('table1')
253- .where({ col: sqlQuery.Query .ne(null) })
253+ .where({ col: sql .ne(null) })
254254 .build();
255255 "SELECT * FROM `table1` WHERE `col` IS NOT NULL"
256256
@@ -342,67 +342,67 @@ Sorry the API documentation is not complete. There are tests in ./test/integrati
342342
343343 sqlSelect
344344 .from('table1')
345- .where({ col: sqlQuery.Query .gt(1) })
345+ .where({ col: sql .gt(1) })
346346 .build();
347347 "SELECT * FROM `table1` WHERE `col` > 1"
348348
349349 sqlSelect
350350 .from('table1')
351- .where({ col: sqlQuery.Query .gte(1) })
351+ .where({ col: sql .gte(1) })
352352 .build();
353353 "SELECT * FROM `table1` WHERE `col` >= 1"
354354
355355 sqlSelect
356356 .from('table1')
357- .where({ col: sqlQuery.Query .lt(1) })
357+ .where({ col: sql .lt(1) })
358358 .build();
359359 "SELECT * FROM `table1` WHERE `col` < 1"
360360
361361 sqlSelect
362362 .from('table1')
363- .where({ col: sqlQuery.Query .lte(1) })
363+ .where({ col: sql .lte(1) })
364364 .build();
365365 "SELECT * FROM `table1` WHERE `col` <= 1"
366366
367367 sqlSelect
368368 .from('table1')
369- .where({ col: sqlQuery.Query .eq(1) })
369+ .where({ col: sql .eq(1) })
370370 .build();
371371 "SELECT * FROM `table1` WHERE `col` = 1"
372372
373373 sqlSelect
374374 .from('table1')
375- .where({ col: sqlQuery.Query .ne(1) })
375+ .where({ col: sql .ne(1) })
376376 .build();
377377 "SELECT * FROM `table1` WHERE `col` <> 1"
378378
379379 sqlSelect
380380 .from('table1')
381- .where({ col: sqlQuery.Query .between('a', 'b') })
381+ .where({ col: sql .between('a', 'b') })
382382 .build();
383383 "SELECT * FROM `table1` WHERE `col` BETWEEN 'a' AND 'b'"
384384
385385 sqlSelect
386386 .from('table1')
387- .where({ col: sqlQuery.Query .not_between('a', 'b') })
387+ .where({ col: sql .not_between('a', 'b') })
388388 .build();
389389 "SELECT * FROM `table1` WHERE `col` NOT BETWEEN 'a' AND 'b'"
390390
391391 sqlSelect
392392 .from('table1')
393- .where({ col: sqlQuery.Query .like('abc') })
393+ .where({ col: sql .like('abc') })
394394 .build();
395395 "SELECT * FROM `table1` WHERE `col` LIKE 'abc'"
396396
397397 sqlSelect
398398 .from('table1')
399- .where({ col: sqlQuery.Query .not_like('abc') })
399+ .where({ col: sql .not_like('abc') })
400400 .build();
401401 "SELECT * FROM `table1` WHERE `col` NOT LIKE 'abc'"
402402
403403 sqlSelect
404404 .from('table1')
405- .where({ col: sqlQuery.Query .not_in([ 1, 2, 3 ]) })
405+ .where({ col: sql .not_in([ 1, 2, 3 ]) })
406406 .build();
407407 "SELECT * FROM `table1` WHERE `col` NOT IN (1, 2, 3)"
408408
0 commit comments