mirror of
https://github.com/perstarkse/minne.git
synced 2026-05-28 10:29:30 +02:00
refactor: simplify and improve testing for initialization
This commit is contained in:
@@ -41,8 +41,10 @@ impl SurrealDbClient {
|
||||
) -> Result<Self, Error> {
|
||||
let db = connect(address).await?;
|
||||
|
||||
// Sign in to database
|
||||
db.signin(Root { username, password }).await?;
|
||||
// Skip sign-in for in-memory engine (no auth support)
|
||||
if !address.starts_with("mem://") {
|
||||
db.signin(Root { username, password }).await?;
|
||||
}
|
||||
|
||||
// Set namespace
|
||||
db.use_ns(namespace).use_db(database).await?;
|
||||
|
||||
Reference in New Issue
Block a user