Skip to content

Commit

Permalink
use postgres
Browse files Browse the repository at this point in the history
  • Loading branch information
aqrln committed Jan 11, 2025
1 parent df862b3 commit 9967692
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions query-engine/core/src/compiler/translate/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,11 @@ use crate::{
use super::TranslateResult;

pub(crate) fn translate_query(query: Query) -> TranslateResult<Expression> {
let connection_info =
ConnectionInfo::External(ExternalConnectionInfo::new(SqlFamily::Sqlite, "main".to_owned(), None));
let connection_info = ConnectionInfo::External(ExternalConnectionInfo::new(
SqlFamily::Postgres,
"public".to_owned(),
None,
));

let ctx = Context::new(&connection_info, None);

Expand All @@ -30,7 +33,7 @@ pub(crate) fn translate_query(query: Query) -> TranslateResult<Expression> {
}

fn build_db_query<'a>(query: impl Into<quaint::ast::Query<'a>>) -> TranslateResult<DbQuery> {
let (sql, params) = quaint::visitor::Sqlite::build(query)?;
let (sql, params) = quaint::visitor::Postgres::build(query)?;
let params = params
.into_iter()
.map(convert::quaint_value_to_prisma_value)
Expand Down

0 comments on commit 9967692

Please sign in to comment.