(conn: &Connection)
| 462 | } |
| 463 | |
| 464 | async fn schema_version(conn: &Connection) -> Option<i64> { |
| 465 | let mut rows = conn |
| 466 | .query( |
| 467 | "SELECT version FROM session_schema_migrations WHERE name = ?1", |
| 468 | params![MIGRATION_NAME], |
| 469 | ) |
| 470 | .await |
| 471 | .ok()?; |
| 472 | rows.next().await.ok()??.get(0).ok() |
| 473 | } |
| 474 | |
| 475 | fn opt_text(value: Option<&str>) -> Value { |
| 476 | value.map_or(Value::Null, |text| Value::Text(text.to_string())) |
no outgoing calls
no test coverage detected