Skip to content

Commit

Permalink
sqlite only
Browse files Browse the repository at this point in the history
  • Loading branch information
inoas committed Jun 25, 2024
1 parent ace2010 commit 2b06dac
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 13 deletions.
6 changes: 2 additions & 4 deletions test/test_helper/maria_test_helper.gleam
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ pub fn setup_and_run(query) {
let _ = dummy.drop_dogs_table_if_exists() |> maria.execute_raw_sql(conn)
let _ = dummy.create_dogs_table() |> maria.execute_raw_sql(conn)
let _ = dummy.insert_dogs_rows() |> maria.execute_raw_sql(conn)

query |> maria.run_query(dynamic.dynamic, conn)
// query |> maria.run_query(dynamic.dynamic, conn)
}

pub fn setup_and_run_write(query) {
Expand All @@ -34,6 +33,5 @@ pub fn setup_and_run_write(query) {
let _ = dummy.drop_dogs_table_if_exists() |> maria.execute_raw_sql(conn)
let _ = dummy.create_dogs_table() |> maria.execute_raw_sql(conn)
let _ = dummy.insert_dogs_rows() |> maria.execute_raw_sql(conn)

query |> maria.run_write(dynamic.dynamic, conn)
// query |> maria.run_write(dynamic.dynamic, conn)
}
6 changes: 2 additions & 4 deletions test/test_helper/postgres_test_helper.gleam
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ pub fn setup_and_run(query) {
let _ = dummy.drop_dogs_table_if_exists() |> postgres.execute_raw_sql(conn)
let _ = dummy.create_dogs_table() |> postgres.execute_raw_sql(conn)
let _ = dummy.insert_dogs_rows() |> postgres.execute_raw_sql(conn)

query |> postgres.run_query(dynamic.dynamic, conn)
// query |> postgres.run_query(dynamic.dynamic, conn)
}

pub fn setup_and_run_write(query) {
Expand All @@ -34,6 +33,5 @@ pub fn setup_and_run_write(query) {
let _ = dummy.drop_dogs_table_if_exists() |> postgres.execute_raw_sql(conn)
let _ = dummy.create_dogs_table() |> postgres.execute_raw_sql(conn)
let _ = dummy.insert_dogs_rows() |> postgres.execute_raw_sql(conn)

query |> postgres.run_write(dynamic.dynamic, conn)
// query |> postgres.run_write(dynamic.dynamic, conn)
}
6 changes: 1 addition & 5 deletions test/test_support/adapter/postgres.gleam
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,7 @@ pub fn write_query_to_prepared_statement(
pub fn with_connection(f: fn(Connection) -> a) -> a {
let connection =
// TODO v2 move this into docker-compose, use docker-compose in git actions/ci
pgo.Config(
..pgo.default_config(),
host: "localhost",
database: "gleam_cake",
)
pgo.Config(..pgo.default_config(), host: "localhost")
|> pgo.connect

let value = f(connection)
Expand Down

0 comments on commit 2b06dac

Please sign in to comment.