MCPcopy Create free account
hub / github.com/SeaQL/sea-orm / Connection

Class Connection

sea-orm-rocket/lib/src/database.rs:185–185  ·  view source on GitHub ↗

A request guard which retrieves a single connection to a [`Database`]. For a database type of `Db`, a request guard of `Connection ` retrieves a single connection to `Db`. The request guard succeeds if the database was initialized by the [`Initializer`] fairing and a connection is available within [`connect_timeout`](crate::Config::connect_timeout) seconds. If the `Initializer` fairing was _n

Source from the content-addressed store, hash-verified

183/// another error occurs, the guard _fails_ with status `ServiceUnavailable`
184/// and the error is returned in `Some`.
185pub struct Connection<'a, D: Database>(&'a <D::Pool as Pool>::Connection);
186
187impl<D: Database> Initializer<D> {
188 /// Returns a database initializer fairing for `D`.

Callers 6

fromMethod · 0.85
transactionMethod · 0.85
transactionMethod · 0.85
transactionMethod · 0.85
from_requestMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected