Ciro Santilli OurBigBook.com $£ Sponsor €¥ 中国独裁统治 China Dictatorship 新疆改造中心、六四事件、法轮功、郝海东、709大抓捕、2015巴拿马文件 邓家贵、低端人口、西藏骚乱
Source code: github.com/sequelize/sequelize
Some usage examples under: Section "Sequelize example".
As of 2021, this library is extremely painful to use. It does feel semi-mature, but there are just too much horrible things going on;
Some glaring issues are listed at the horrors of Sequelize.

Sequelize example

words: 743 articles: 4
To run examples on a specific database:
  • ./index.js or ./index.js l: SQLite
  • ./index.js p: PostgreSQL. You must manually create a database called tmp and ensure that peer authentication works for it
All examples can be tested on all databases with:
cd sequelize
./test
Overview of the examples:
Exampes under nodejs/sequelize/raw:
No support:
Example with raw examples under nodejs/sequelize/raw/many_to_many.js

Sequelize parallel example

words: 149 articles: 1
This example is the same as nodejs/sequelize/raw/parallel_select_and_update.js, but going through Sequelize rather than with Sequelize raw queries. NONE is not supported for now to not have a transaction at all because lazy.
The examples illustrates: stackoverflow.com/questions/55452441/for-share-and-for-update-statements-in-sequelize
Sample invocation:
node --unhandled-rejections=strict ./parallel_select_and_update.js p 10 100 READ_COMMITTED UPDATE
where:
Other examples:
  • node --unhandled-rejections=strict ./parallel_select_and_update.js p 10 100 READ_COMMITTED UPDATE
Then, the outcome is exactly as described at: nodejs/sequelize/raw/parallel_select_and_update.js:
nodejs/sequelize/parallel_select_and_update.js was not rendered because it is too large (> 2000 bytes)
Transaction retries are inevitable, as some sQL isolation levels
Doesn't seem to have any simple built-in mechanism?
Example: nodejs/sequelize/trigger_count.js
There is of course no built-in support for SQL TRIGGERs in Sequelize, but we can add our own: stackoverflow.com/questions/29716346/how-to-create-a-trigger-in-sequelize-nodejs/76215728#76215728

Ancestors

  1. Node.js ORM library
  2. Node.js library
  3. Node.js
  4. JavaScript
  5. List of programming languages
  6. Programming language
  7. Software
  8. Computer
  9. Information technology
  10. Area of technology
  11. Technology
  12. Ciro Santilli's Homepage