pub struct AnyConnection(_);
Expand description

A connection to any SQLx database.

The database driver used is determined by the scheme of the connection url.

postgres://postgres@localhost/test
sqlite://a.sqlite

Implementations

Trait Implementations

Explicitly close this database connection. Read more

Checks if a connection to the database is still valid.

Begin a new transaction or establish a savepoint within the active transaction. Read more

The number of statements currently cached in the connection.

Removes all statements from the cache, closing them on the server if needed. Read more

Execute the function inside a transaction. Read more

Establish a new database connection. Read more

Establish a new database connection with the provided options.

Formats the value using the given formatter. Read more

Execute multiple queries and return the generated results as a stream from each query, in a stream. Read more

Execute the query and returns at most one row.

Prepare the SQL query, with parameter type information, to inspect the type information about its parameters and results. Read more

Execute the query and return the total number of rows affected.

Execute multiple queries and return the rows affected from each query, in a stream.

Execute the query and return the generated results as a stream.

Execute the query and return all the generated results, collected into a Vec.

Execute the query and returns exactly one row.

Prepare the SQL query to inspect the type information of its parameters and results. Read more

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

👎 Deprecated
👎 Deprecated

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.

Calls U::from(self).

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

Should always be Self

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.