fn open_storage(&self, id: &str, config: Option<&str>, _credentials: Option<&str>) -> IndyResult<Box<dyn WalletStorage>> {
        let config = config
            .map(serde_json::from_str::<Config>)
            .map_or(Ok(None), |v| v.map(Some))
            .to_indy(IndyErrorKind::InvalidStructure, "Malformed config json")?;

        let db_file_path = SQLiteStorageType::_db_path(id, config.as_ref());

        if !db_file_path.exists() {
            return Err(err_msg(IndyErrorKind::WalletNotFound, "No wallet database exists"));
        }

        let conn = rusqlite::Connection::open(db_file_path.as_path())?;

        // set journal mode to WAL, because it provides better performance.
        let journal_mode: String = conn.query_row(
            "PRAGMA journal_mode = WAL",
            [],
            |row| { row.get(0) },
        )?;

        // if journal mode is set to WAL, set synchronous to FULL for safety reasons.
        // (synchronous = NORMAL with journal_mode = WAL does not guaranties durability).
        if journal_mode.to_lowercase() == "wal" {
            conn.execute("PRAGMA synchronous = FULL", [])?;
        }

        Ok(Box::new(SQLiteStorage { conn: Rc::new(conn) }))
    }
///
/// Establishes a connection to the SQLite DB with the provided id located in the path
/// specified in the config. In case of a successful onection returns a Storage object
/// embedding the connection and the encryption keys that will be used for encryption and
/// decryption operations.
///
///
/// # Arguments
///
///  * `id` - id of the SQLite DB file
///  * `config` - config containing the location of SQLite DB files
///  * `credentials` - DB credentials
///
/// # Returns
///
/// Result that can be either:
///
///  * `(Box<Storage>, Vec<u8>)` - Tuple of `SQLiteStorage` and `encryption keys`
///  * `IndyError`
///
/// # Errors
///
/// Any of the following `IndyError` type_ of errors can be throw by this method:
///
///  * `IndyError::NotFound` - File with the provided id not found
///  * `IOError("IO error during storage operation:...")` - Failed connection or SQL query
///
Establishes a connection to the SQLite DB with the provided id located in the path
specified in the config. In case of a successful onection returns a Storage object
embedding the connection and the encryption keys that will be used for encryption and
decryption operations.
Establishes a connection to the SQLite DB with the provided id located in the path specified in the config . In case of a successful onection returns a Storage object embedding the connection and the encryption keys that will be used for encryption and decryption operations .
fn open_storage(&self, id: &str, config: Option<&str>, _credentials: Option<&str>) -> IndyResult<Box<dyn WalletStorage>> {
        let config = config
            .map(serde_json::from_str::<Config>)
            .map_or(Ok(None), |v| v.map(Some))
            .to_indy(IndyErrorKind::InvalidStructure, "Malformed config json")?;
        let db_file_path = SQLiteStorageType::_db_path(id, config.as_ref());
        if !db_file_path.exists() {
            return Err(err_msg(IndyErrorKind::WalletNotFound, "No wallet database exists"));
        }
        let conn = rusqlite::Connection::open(db_file_path.as_path())?;
        // set journal mode to WAL, because it provides better performance.
        let journal_mode: String = conn.query_row(
            "PRAGMA journal_mode = WAL",
            [],
            |row| { row.get(0) },
        )?;
        // if journal mode is set to WAL, set synchronous to FULL for safety reasons.
        // (synchronous = NORMAL with journal_mode = WAL does not guaranties durability).
        if journal_mode.to_lowercase() == "wal" {
            conn.execute("PRAGMA synchronous = FULL", [])?;
        }
        Ok(Box::new(SQLiteStorage { conn: Rc::new(conn) }))
    }
fn open_storage ( & self , id : & str , config : Option < & str > , _credentials : Option < & str > ) -> IndyResult < Box < dyn WalletStorage > > { let config = config . map ( serde_json :: from_str :: < Config > ) . map_or ( Ok ( None ) , | v | v . map ( Some ) ) . to_indy ( IndyErrorKind :: InvalidStructure , " " ) ? ; let db_file_path = SQLiteStorageType :: _db_path ( id , config . as_ref ( ) ) ; if ! db_file_path . exists ( ) { return Err ( err_msg ( IndyErrorKind :: WalletNotFound , " " ) ) ; } let conn = rusqlite :: Connection :: open ( db_file_path . as_path ( ) ) ? ; // set journal mode to WAL, because it provides better performance. let journal_mode : String = conn . query_row ( " " , [ ] , | row | { row . get ( 0 ) } , ) ? ; // if journal mode is set to WAL, set synchronous to FULL for safety reasons. // (synchronous = NORMAL with journal_mode = WAL does not guaranties durability). if journal_mode . to_lowercase ( ) == " " { conn . execute ( " " , [ ] ) ? ; } Ok ( Box :: new ( SQLiteStorage { conn : Rc :: new ( conn ) } ) ) }
Establishes a connection to the SQLite DB with the provided id located in the path
specified in the config.
Establishes a connection to the SQLite DB with the provided id located in the path specified in the config .
&self
id
&str
config
Option<&str>
_credentials
Option<&str>
Result that can be either.

`(Box, Vec)` - Tuple of `SQLiteStorage` and `encryption keys`
`IndyError`
Result that can be either . ` ( Box Vec ) ` - Tuple of ` SQLiteStorage ` and ` encryption keys ` ` IndyError `
&self
id
&str
config
Option<&str>
_credentials
Option<&str>
errors
Any of the following `IndyError` type_ of errors can be throw by this method.

`IndyError::NotFound` - File with the provided id not found
`IOError("IO error during storage operation:...")` - Failed connection or SQL query
Any of the following ` IndyError ` type_ of errors can be throw by this method . ` IndyError :: NotFound ` - File with the provided id not found ` IOError ( " IO error during storage operation : ... " ) ` - Failed connection or SQL query