#[cfg(any(feature = "sqlite", test))]
pub(crate) const SQLITE_TABLE_EXISTS_SQL: &str =
    "SELECT EXISTS(SELECT 1 FROM sqlite_master WHERE type = 'table' AND name = ?1)";

#[cfg(any(feature = "sqlite", test))]
pub(crate) const SQLITE_TABLE_PRESENT_SQL: &str =
    "SELECT 1 FROM sqlite_master WHERE type = 'table' AND name = ?1";

#[cfg(any(feature = "duckdb", test))]
pub(crate) const DUCKDB_TABLE_EXISTS_SQL: &str =
    "SELECT EXISTS(SELECT 1 FROM information_schema.tables WHERE table_name = ?1)";

#[cfg(any(feature = "duckdb", test))]
pub(crate) const DUCKDB_TABLE_PRESENT_SQL: &str =
    "SELECT 1 FROM information_schema.tables WHERE table_name = ?1";

#[cfg(any(feature = "postgres", test))]
pub(crate) const POSTGRES_TABLE_EXISTS_SQL: &str = "SELECT EXISTS (\
     SELECT 1 FROM information_schema.tables \
     WHERE table_schema = $1 AND table_name = $2\
     )";

#[cfg(any(feature = "quack", test))]
pub(crate) fn quack_table_exists_count_sql(
    table_name_literal: &str,
    catalog_filter: &str,
) -> String {
    format!(
        "SELECT COUNT(*) FROM information_schema.tables WHERE table_name = {table_name_literal}{catalog_filter}"
    )
}
