pub struct LibsqlPoolProvider { /* private fields */ }Expand description
Remote libSQL/Turso pool implementing the driver-neutral neotales_dbapi traits.
Implementations§
Source§impl LibsqlPoolProvider
impl LibsqlPoolProvider
Sourcepub async fn connect(config: LibsqlConfig) -> Result<Self, DbError>
pub async fn connect(config: LibsqlConfig) -> Result<Self, DbError>
Builds the remote client and verifies connectivity with one sanitized SELECT 1.
The probe establishes that TLS, the endpoint, and authentication accept a request. It does not create or migrate any schema.
§Errors
Returns InvalidArgument for invalid configuration, Timeout when the connectivity budget
elapses, or a sanitized Connection error. No driver text is retained.
Sourcepub async fn acquire_libsql_session(&self) -> Result<LibsqlSession, DbError>
pub async fn acquire_libsql_session(&self) -> Result<LibsqlSession, DbError>
Acquires one exclusive session. Drop the session to release its permit.
libSQL remote sessions are independent HTTP clients, not reused sockets. The configured maximum is a concurrency bound; dropping a session does not preserve server-side state.
§Errors
Returns Timeout when no permit becomes available within the configured budget, or a
sanitized Connection error.
Sourcepub async fn acquire_libsql(
&self,
) -> Result<Box<dyn ImmediateTransaction>, DbError>
pub async fn acquire_libsql( &self, ) -> Result<Box<dyn ImmediateTransaction>, DbError>
Acquires one exclusive session as an ImmediateTransaction trait object.
§Errors
Returns Timeout when no permit becomes available within the configured budget, or a
sanitized Connection error.