pub struct Database { /* private fields */ }
Implementations
sourceimpl Database
impl Database
pub fn establish(workspace: Workspace) -> Result<Database>
pub fn establish_quiet(workspace: Workspace) -> Result<Database>
pub fn name(&self) -> &str
pub fn db(&self) -> &SqliteConnection
pub fn workspace(&self) -> &Workspace
pub fn autonoscope_add_rule(
&mut self,
object: &RuleType,
value: &str,
scoped: bool
) -> Result<()>
pub fn autonoscope_delete_rule(
&mut self,
object: &RuleType,
value: &str
) -> Result<()>
pub fn autonoscope_rules(&self) -> Vec<(&'static str, String, bool)>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
pub fn autonoscope(&self) -> &RuleSet
sourcepub fn insert_generic(&self, object: Insert) -> Result<Option<(DbChange, i32)>>
pub fn insert_generic(&self, object: Insert) -> Result<Option<(DbChange, i32)>>
Returns true if we didn’t have this value yet
sourcepub fn insert_struct<T: InsertableStruct<M>, M: Model + Scopable>(
&self,
obj: T,
scoped: bool
) -> Result<Option<(DbChange, i32)>>
pub fn insert_struct<T: InsertableStruct<M>, M: Model + Scopable>(
&self,
obj: T,
scoped: bool
) -> Result<Option<(DbChange, i32)>>
Returns true if we didn’t have this value yet
pub fn insert_activity(&self, obj: NewActivity) -> Result<bool>
pub fn insert_subdomain_ipaddr_struct(
&self,
subdomain_ipaddr: &NewSubdomainIpAddr
) -> Result<Option<(DbChange, i32)>>
pub fn insert_network_device_struct(
&self,
network_device: &NewNetworkDevice
) -> Result<Option<(DbChange, i32)>>
pub fn insert_breach_email_struct(
&self,
obj: NewBreachEmail
) -> Result<Option<(DbChange, i32)>>
pub fn update_generic(&self, update: &Update) -> Result<i32>
pub fn update_subdomain(
&self,
subdomain_update: &SubdomainUpdate
) -> Result<i32>
pub fn update_ipaddr(&self, ipaddr_update: &IpAddrUpdate) -> Result<i32>
pub fn update_url(&self, url_update: &UrlChangeset) -> Result<i32>
pub fn update_email(&self, email_update: &EmailUpdate) -> Result<i32>
pub fn update_phonenumber(
&self,
phonenumber_update: &PhoneNumberUpdate
) -> Result<i32>
pub fn update_device(&self, device_update: &DeviceUpdate) -> Result<i32>
pub fn update_network(&self, network_update: &NetworkUpdate) -> Result<i32>
pub fn update_network_device(
&self,
network_device_update: &NetworkDeviceUpdate
) -> Result<i32>
pub fn update_account(&self, account_update: &AccountUpdate) -> Result<i32>
pub fn update_breach_email(
&self,
breach_email_update: &BreachEmailUpdate
) -> Result<i32>
pub fn update_image(&self, image_update: &ImageUpdate) -> Result<i32>
pub fn update_port(&self, port_update: &PortUpdate) -> Result<i32>
pub fn update_netblock(&self, netblock_update: &NetblockUpdate) -> Result<i32>
pub fn update_cryptoaddr(
&self,
cryptoaddr_update: &CryptoAddrUpdate
) -> Result<i32>
pub fn get_opt(&self, family: &Family, value: &str) -> Result<Option<i32>>
pub fn list<T: Model>(&self) -> Result<Vec<T>>
pub fn filter<T: Model>(&self, filter: &Filter) -> Result<Vec<T>>
pub fn filter_with_param<T: Model>(
&self,
filter: &Filter,
param: Option<&String>
) -> Result<Vec<T>>
Auto Trait Implementations
impl !RefUnwindSafe for Database
impl Send for Database
impl !Sync for Database
impl Unpin for Database
impl UnwindSafe for Database
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> IntoSql for T
impl<T> IntoSql for T
sourcefn into_sql<T>(self) -> Self::Expression where
Self: AsExpression<T>,
fn into_sql<T>(self) -> Self::Expression where
Self: AsExpression<T>,
Convert self
to an expression for Diesel’s query builder. Read more
sourcefn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression where
&'a Self: AsExpression<T>,
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression where
&'a Self: AsExpression<T>,
Convert &self
to an expression for Diesel’s query builder. Read more