New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to use the function that supports sqlite to set password? #466
Comments
Hello, I saw that there is a function to set a password for SQLite in the code. A small bug will cause the setting to be overwritten. After modification, it has no effect after testing. How can I set a password for SQLite?
|
use rbatis::{DefaultPool, RBatis};
use rbdc_sqlite::{SqliteConnectOptions, SqliteDriver};
let mut rb = RBatis::new();
let mut opts = SqliteConnectOptions::default().pragma("key","password");
opts.set_uri("sqlite://target/sqlite.db");
rb.init_option::< SqliteDriver, SqliteConnectOptions, DefaultPool>(SqliteDriver{}, opts).unwrap(); |
use rbatis::{DefaultPool, RBatis};
use rbdc_sqlite::{SqliteConnectOptions, SqliteDriver};
let mut rb = RBatis::new();
let mut opts = SqliteConnectOptions::default().pragma("key","password");
opts.set_uri("sqlite://target/sqlite.db");
rb.init_option::< SqliteDriver, SqliteConnectOptions, DefaultPool>(SqliteDriver{}, opts).unwrap(); |
run |
OK,thx! |
你好,我看到代码中有给sqlite设置密码的功能,有点小bug会导致设置被覆盖,修改之后,经测试没有效果,请问下怎么才能给sqlite设置密码呢?
The text was updated successfully, but these errors were encountered: