不要怂,就是干,撸起袖子干!

Commit 40342064 by Emmet McPoland Committed by Jan Aagaard Meier

Added SQCipher support for SQLite (#6366)

1 parent d1571542
# Future
- [ADDED] SQLCipher support via the SQLite connection manager
- [CHANGED] Range type bounds now default to [postgres default](https://www.postgresql.org/docs/9.5/static/rangetypes.html#RANGETYPES-CONSTRUCT) `[)` (inclusive, exclusive) [#5990](https://github.com/sequelize/sequelize/issues/5990)
- [ADDED] Support for range operators [#5990](https://github.com/sequelize/sequelize/issues/5990)
- [FIXED] Broken transactions in `MySQL` [#3568](https://github.com/sequelize/sequelize/issues/3568)
......
......@@ -67,6 +67,10 @@ class ConnectionManager extends AbstractConnectionManager {
}
);
}).tap(connection => {
if (this.sequelize.config.password) {
// Make it possible to define and use password for sqlite encryption plugin like sqlcipher
connection.run('PRAGMA KEY=' + this.sequelize.escape(this.sequelize.config.password));
}
if (this.sequelize.options.foreignKeys !== false) {
// Make it possible to define and use foreign key constraints unless
// explicitly disallowed. It's still opt-in per relation
......
......@@ -57,7 +57,7 @@ const _ = require('lodash');
*
* @param {String} database The name of the database
* @param {String} [username=null] The username which is used to authenticate against the database.
* @param {String} [password=null] The password which is used to authenticate against the database.
* @param {String} [password=null] The password which is used to authenticate against the database. Supports SQLCipher encryption for SQLite.
* @param {Object} [options={}] An object with options.
* @param {String} [options.host='localhost'] The host of the relational database.
* @param {Integer} [options.port=] The port of the relational database.
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!