pub struct MockDb<'a> { /* private fields */ }
Expand description

The implementation collects all SQL statements that can be asserted. For loading it return default values.

Implementations

Trait Implementations

Insert one struct.

Skip fields in struct that are auto generated with #[toql(skip_inup)]. Returns the last generated id.

Load a struct with dependencies for a given Toql query.

Returns a struct or a ToqlMySqlAsyncError if no struct was found NotFound or more than one NotUnique.

Load a vector of structs with dependencies for a given Toql query.

Returns a tuple with the structs and an optional tuple of count values. If count argument is false, no count queries are run and the resulting Option<(u32,u32)> will be None otherwise the count queries are run and it will be Some((total count, filtered count)).

Load a vector of structs with dependencies for a given Toql query.

Returns a tuple with the structs and an optional tuple of count values. If count argument is false, no count queries are run and the resulting Option<(u32,u32)> will be None otherwise the count queries are run and it will be Some((unpaged count, unfiltered count)).

Counts the number of rows that match the query predicate.

Returns a struct or a ToqlMySqlAsyncError if no struct was found NotFound or more than one NotUnique.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more