[−][src]Struct df_st_core::config::DatabaseConfig
Everything in the configuration under
df_storyteller-config.json
.database
.
Fields
service: Option<String>
Database service name, only "postgres" and "sqlite" are supported. Default is set to "sqlite"
uri: Option<String>
Directly set the URI/URL for a database connection.
If uri
is set config
will be ignored.
SQLite example: df_st_database.db
(just the filename or path to file)
Postgres example:
postgres://df_storyteller:password123@localhost:5432/df_storyteller
For more info about Postgres connection URI
here.
config: DBURLConfig
Config used to create the connection with the database.
This config is used to create a URI, so some characters
(in password for example) might return errors.
If uri
is set the object will be ignored.
pool_size: Option<i64>
When connecting to the database it will open multiple connections. Set the size of the pool of connections that will be opened. This is mostly be utilized when the API is running.
Trait Implementations
impl Clone for DatabaseConfig
[src]
fn clone(&self) -> DatabaseConfig
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for DatabaseConfig
[src]
impl Default for DatabaseConfig
[src]
impl<'de> Deserialize<'de> for DatabaseConfig
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl PartialEq<DatabaseConfig> for DatabaseConfig
[src]
fn eq(&self, other: &DatabaseConfig) -> bool
[src]
fn ne(&self, other: &DatabaseConfig) -> bool
[src]
impl Serialize for DatabaseConfig
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralPartialEq for DatabaseConfig
[src]
Auto Trait Implementations
impl RefUnwindSafe for DatabaseConfig
impl Send for DatabaseConfig
impl Sync for DatabaseConfig
impl Unpin for DatabaseConfig
impl UnwindSafe for DatabaseConfig
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> DynClone for T where
T: Clone,
[src]
T: Clone,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,