Skip to content
This repository has been archived by the owner on Nov 9, 2021. It is now read-only.

MSSQL Boolean type #363

Open
bminer opened this issue Aug 21, 2018 · 0 comments
Open

MSSQL Boolean type #363

bminer opened this issue Aug 21, 2018 · 0 comments

Comments

@bminer
Copy link

bminer commented Aug 21, 2018

Unfortunately for Microsoft, their RDBMS does not understand TRUE and FALSE. It only understands 1 and 0.

useFlavour('mssql') should be adjusted to accommodate this inferior database. ;)

Workaround:

const squel = require('squel').useFlavour('mssql');

// Handle booleans better
squel.registerValueHandler('boolean', (val) => val ? '1' : '0');

squel
  .insert()
  // .......
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant