v0.5.3-pre.002
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
// file: ks-store/src/postgres/query/health_queries.rs
|
||||
// version: 2
|
||||
// version: 3
|
||||
|
||||
//! PostgreSQL health and diagnostic SQL queries.
|
||||
|
||||
pub(in crate::postgres) async fn run_health_check(pool: &sqlx::PgPool) -> ks_core::Result<()> {
|
||||
pub(crate) async fn run_health_check(pool: &sqlx::PgPool) -> ks_core::Result<()> {
|
||||
let query_result = sqlx::query_scalar::<sqlx::Postgres, i32>("SELECT 1").fetch_one(pool).await;
|
||||
return match query_result {
|
||||
std::result::Result::Ok(_value) => std::result::Result::Ok(()),
|
||||
@@ -13,7 +13,7 @@ pub(in crate::postgres) async fn run_health_check(pool: &sqlx::PgPool) -> ks_cor
|
||||
};
|
||||
}
|
||||
|
||||
pub(in crate::postgres) async fn load_current_schema(
|
||||
pub(crate) async fn load_current_schema(
|
||||
pool: &sqlx::PgPool,
|
||||
) -> ks_core::Result<std::string::String> {
|
||||
let query_result =
|
||||
@@ -28,7 +28,7 @@ pub(in crate::postgres) async fn load_current_schema(
|
||||
};
|
||||
}
|
||||
|
||||
pub(in crate::postgres) async fn load_server_version(
|
||||
pub(crate) async fn load_server_version(
|
||||
pool: &sqlx::PgPool,
|
||||
) -> ks_core::Result<std::string::String> {
|
||||
let query_result =
|
||||
@@ -43,7 +43,7 @@ pub(in crate::postgres) async fn load_server_version(
|
||||
};
|
||||
}
|
||||
|
||||
pub(in crate::postgres) async fn load_migration_table_name(
|
||||
pub(crate) async fn load_migration_table_name(
|
||||
pool: &sqlx::PgPool,
|
||||
) -> ks_core::Result<std::option::Option<std::string::String>> {
|
||||
let query_result =
|
||||
@@ -60,7 +60,7 @@ pub(in crate::postgres) async fn load_migration_table_name(
|
||||
};
|
||||
}
|
||||
|
||||
pub(in crate::postgres) async fn load_latest_migration_version(
|
||||
pub(crate) async fn load_latest_migration_version(
|
||||
pool: &sqlx::PgPool,
|
||||
) -> ks_core::Result<std::option::Option<std::string::String>> {
|
||||
let query_result = sqlx::query_scalar::<sqlx::Postgres, std::option::Option<std::string::String>>(
|
||||
|
||||
Reference in New Issue
Block a user