#[non_exhaustive]pub enum Workload {
Insert,
SelectByKey,
Update,
Transaction,
Savepoint,
UpsertWhere,
}Expand description
One thing worth timing, with the contract leaf it depends on.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Insert
INSERT of one row to a fresh key, outside a transaction.
SelectByKey
SELECT of one row by primary key, over a table of 100 rows.
Update
UPDATE of one row by primary key.
Transaction
begin, one INSERT, commit.
Savepoint
Inside an open transaction: SAVEPOINT, one INSERT, ROLLBACK TO SAVEPOINT (three statements).
UpsertWhere
INSERT .. ON CONFLICT (id) DO UPDATE .. WHERE, over 100 rows, always taking the update branch.
Implementations§
Trait Implementations§
impl Copy for Workload
impl Eq for Workload
Source§impl Ord for Workload
impl Ord for Workload
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for Workload
impl PartialOrd for Workload
impl StructuralPartialEq for Workload
Auto Trait Implementations§
impl Freeze for Workload
impl RefUnwindSafe for Workload
impl Send for Workload
impl Sync for Workload
impl Unpin for Workload
impl UnsafeUnpin for Workload
impl UnwindSafe for Workload
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more