cyjake / leoric

👑 JavaScript ORM for MySQL, PostgreSQL, and SQLite.

Home Page:https://leoric.js.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Does dialect support dialectModule like sequelize.js ?

Beace opened this issue · comments

commented

image

yep, you can use options.client to specify the actual client to be used to access database, such as:

const realm = new Realm({
  dialect: 'sqlite',
  client: '@journeyapps/sqlcipher',
})

https://sequelize.org/api/v7/interfaces/config#dialectModule
It looks like there are two options related to custom dialect module, opts.dialectModule for the module itself, and opts.dialectModulePath for the path of the module. To mimic the latter behavior, opts.dialectModulePath is now supported.
@Beace

commented

OK, I will have a try later.