UNPKG

node-querybuilder

Version:

Modeled after Codeigniter's QueryBuilder. Build and execute queries in a safe and database-agnostic way.

19 lines (17 loc) 592 B
const should = require('chai').should(); const expect = require('chai').expect; const QueryBuilder = require('../../drivers/mssql/query_builder.js'); const qb = new QueryBuilder(); describe('MSSQL: distinct()', () => { it('should exist', () => { should.exist(qb.distinct); }); it('should be a function', () => { qb.distinct.should.be.a('function'); }); it('should override the default distinct_clause with the "DISTINCT " keyword', () => { qb.reset_query(); qb.distinct(); qb.distinct_clause.should.eql(['DISTINCT ']); }); });