alex-jss / examle-sequelize-csdb-mssql

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

  1. npm i
  2. Edit the database config in config/
  3. Replace the line in node_modules/sequelize/lib/dialects/abstract/query-generator/helpers/quote.js

before: https://github.com/sequelize/sequelize/blob/9f950cbcbdd659d559496b77c40e0f827b108561/lib/dialects/abstract/query-generator/helpers/quote.js#L68

after:

let cleanIdentifier = identifier.replace(/[[\]']+/g, '');
return cleanIdentifier.endsWith('.dbo') ? cleanIdentifier.split('.').map(part => `[${part}]`).join('.') : `[${cleanIdentifier}]`;
  1. npm run createDb
  2. npm run migrateDb
  3. npm run dev
  4. Open http://localhost:48790/getList

About


Languages

Language:JavaScript 100.0%