-
Notifications
You must be signed in to change notification settings - Fork 50
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
Explore using sqlite #652
base: main
Are you sure you want to change the base?
Explore using sqlite #652
Conversation
New Issues
Fixed Issues
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #652 +/- ##
==========================================
+ Coverage 56.00% 56.76% +0.76%
==========================================
Files 193 196 +3
Lines 12607 12851 +244
==========================================
+ Hits 7060 7295 +235
- Misses 5547 5556 +9 ☔ View full report in Codecov by Sentry. |
# Conflicts: # Cargo.lock # crates/bitwarden/src/vault/cipher/mod.rs
// TODO: Move into a separate util | ||
guard | ||
.execute( | ||
"CREATE TABLE IF NOT EXISTS ciphers ( | ||
id TEXT PRIMARY KEY, | ||
value TEXT NOT NULL | ||
)", | ||
(), | ||
) | ||
.unwrap(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm thinking of moving this into a migration service instead.
|
||
pub struct ClientVault<'a> { | ||
pub(crate) client: &'a mut crate::Client, | ||
pub cipher_repository: Box<dyn CipherRepository + Send>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think repositories should be internal to the module and we probably want to expose some service instead. Since we will want to hook into some event system, and probably expose nice methods for saving decrypted views.
# Conflicts: # Cargo.lock # crates/bitwarden-core/src/.gitignore # crates/bitwarden-vault/src/cipher/repository.rs # crates/bitwarden-vault/src/sync.rs # crates/bitwarden/Cargo.toml # crates/bitwarden/src/client/client.rs # crates/bitwarden/src/client/mod.rs # crates/bitwarden/src/error.rs # crates/bitwarden/src/vault/client_vault.rs
@@ -79,6 +82,7 @@ | |||
})), | |||
external_client, | |||
encryption_settings: RwLock::new(None), | |||
db: Arc::new(Mutex::new(SqliteDatabase::default().unwrap())), |
Check failure
Code scanning / clippy
used unwrap() on a Result value Error
pub fn default() -> Result<Self, DatabaseError> { | ||
let conn = | ||
Connection::open("test.sqlite").map_err(|_| DatabaseError::FailedToOpenConnection)?; | ||
|
||
Self::new_conn(conn) | ||
} |
Check failure
Code scanning / clippy
method default can be confused for the standard trait method std::default::Default::default Error
Type of change
Objective
Code changes
Before you submit