123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- var Test = require('../../support/test-runner');
- describe('Query Generation ::', function() {
- describe('DELETE statements', function() {
- it('should generate an insert query', function(done) {
- Test({
- query: {
- del: true,
- from: 'accounts',
- where: {
- and: [
- {
- activated: false
- }
- ]
- }
- },
- outcomes: [
- {
- dialect: 'postgresql',
- sql: 'delete from "accounts" where "activated" = $1',
- bindings: [false]
- },
- {
- dialect: 'mysql',
- sql: 'delete from `accounts` where `activated` = ?',
- bindings: [false]
- },
- {
- dialect: 'sqlite3',
- sql: 'delete from "accounts" where "activated" = ?',
- bindings: [false]
- },
- {
- dialect: 'oracle',
- sql: 'delete from "accounts" where "activated" = :1',
- bindings: ['0']
- },
- {
- dialect: 'mariadb',
- sql: 'delete from `accounts` where `activated` = ?',
- bindings: [false]
- }
- ]
- }, done);
- });
- });
- });
|