Skip to content

Commit

Permalink
fix(compiler): panic for other drivers than postgres for now
Browse files Browse the repository at this point in the history
  • Loading branch information
FGoessler committed Jan 15, 2025
1 parent 846f9a8 commit 6c08ce3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions query-engine/core/src/compiler/translate/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@ pub(crate) fn translate_query(query: Query, connection_info: &ConnectionInfo) ->
fn build_db_query<'a>(query: impl Into<quaint::ast::Query<'a>>, ctx: &Context<'_>) -> TranslateResult<DbQuery> {
let (sql, params) = match ctx.connection_info.sql_family() {
SqlFamily::Postgres => quaint::visitor::Postgres::build(query)?,
SqlFamily::Mysql => quaint::visitor::Mysql::build(query)?,
SqlFamily::Sqlite => quaint::visitor::Sqlite::build(query)?,
SqlFamily::Mssql => quaint::visitor::Mssql::build(query)?,
// TODO: implement proper switch for other databases once proper feature flags are supported/logic is extracted
_ => unimplemented!(),
// SqlFamily::Mysql => quaint::visitor::Mysql::build(query)?,
// SqlFamily::Sqlite => quaint::visitor::Sqlite::build(query)?,
// SqlFamily::Mssql => quaint::visitor::Mssql::build(query)?,
};

let params = params
Expand Down

0 comments on commit 6c08ce3

Please sign in to comment.