pub struct SQLiteDriverOptions {
pub file_name: String,
pub table_name: String,
}
Expand description
Configuration options for the SQLite database driver.
This struct holds configuration options specific to the SQLite database driver. It contains settings for the SQLite database file and the table name that the driver will use for interactions. These options are passed when initializing the database driver to configure the connection and operations on the SQLite database.
§Fields
-
file_name
: The path to the SQLite database file. This is the file on the filesystem where the SQLite database is stored. If the file doesn’t exist, it may be created depending on the database driver’s behavior or settings. Thefile_name
is represented as aString
, allowing flexibility in specifying file paths or database names. -
table_name
: The name of the table in the SQLite database that the driver will operate on. This allows specifying which table to query or manipulate during database interactions. Thetable_name
is aString
and should correspond to the actual table in the database.
§Example Usage
let options = SQLiteDriverOptions {
file_name: "json.sqlite".to_string(),
table_name: "users".to_string(),
};
In this example, the SQLite database is located in the file "json.sqlite"
, and the
driver will interact with the "users"
table within that database.
Fields§
§file_name: String
Path to the SQLite database file. This file contains the SQLite database that the driver will connect to.
table_name: String
Name of the table to operate on within the SQLite database. This should match an existing table in the database.
Trait Implementations§
Source§impl Clone for SQLiteDriverOptions
impl Clone for SQLiteDriverOptions
Source§fn clone(&self) -> SQLiteDriverOptions
fn clone(&self) -> SQLiteDriverOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more