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

Function get_version

src/driver/sqlx_sqlite.rs:315–329  ·  view source on GitHub ↗
(conn: &SqlxSqlitePoolConnection)

Source from the content-addressed store, hash-verified

313
314#[cfg(feature = "sqlite-use-returning-for-3_35")]
315async fn get_version(conn: &SqlxSqlitePoolConnection) -> Result<String, DbErr> {
316 let stmt = Statement {
317 sql: "SELECT sqlite_version()".to_string(),
318 values: None,
319 db_backend: crate::DbBackend::Sqlite,
320 };
321 conn.query_one(stmt)
322 .await?
323 .ok_or_else(|| {
324 DbErr::Conn(RuntimeErr::Internal(
325 "Error reading SQLite version".to_string(),
326 ))
327 })?
328 .try_get_by(0)
329}
330
331#[cfg(feature = "sqlite-use-returning-for-3_35")]
332fn ensure_returning_version(version: &str) -> Result<(), DbErr> {

Callers 1

connectMethod · 0.85

Calls 2

try_get_byMethod · 0.45
query_oneMethod · 0.45

Tested by

no test coverage detected