Skip to content

Commit

Permalink
better logging for on-db filesystem initialization
Browse files Browse the repository at this point in the history
see #718
  • Loading branch information
lovasoa committed Nov 27, 2024
1 parent b1da4d6 commit a59233e
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/filesystem.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,19 +176,27 @@ impl DbFsQueries {
PgTimeTz::type_info().into(),
<str as Type<Postgres>>::type_info().into(),
];
log::debug!(
"Preparing the database filesystem was_modified_query: {}",
was_modified_query
);
db.prepare_with(&was_modified_query, param_types).await
}

async fn make_read_file_query(
db: &Database,
db_kind: AnyKind,
) -> anyhow::Result<AnyStatement<'static>> {
let was_modified_query = format!(
let read_file_query = format!(
"SELECT contents from sqlpage_files WHERE path = {}",
make_placeholder(db_kind, 1),
);
let param_types: &[AnyTypeInfo; 1] = &[<str as Type<Postgres>>::type_info().into()];
db.prepare_with(&was_modified_query, param_types).await
log::debug!(
"Preparing the database filesystem read_file_query: {}",
read_file_query
);
db.prepare_with(&read_file_query, param_types).await
}

async fn file_modified_since_in_db(
Expand Down

0 comments on commit a59233e

Please sign in to comment.