Skip to content

Commit 6c69228

Browse files
authored
Merge pull request #17 from inoas/replace_gleam_pgo_with_pog
2.1.0
2 parents ec27fd3 + 53c915e commit 6c69228

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+285
-283
lines changed

.tool-versions

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
erlang 26.2.5.5
2-
gleam 1.4.1
2+
gleam 1.5.1
33
# erlang 27.1.2
44
# gleam nightly

CHANGELOG.md

+11-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
55

66
<!-- ## [Unreleased] -->
77

8+
## [2.1.0] - 2024-11-14
9+
10+
- Added convenience functions to `select` module to select columns by col names:
11+
- `select_cols`
12+
- `replace_select_cols`
13+
- `select_col`
14+
- `replace_select_col`
15+
- Replaced dev/test and adapter target `gleam_pgo` with `pgo` dependency.
16+
- Updated demos.
17+
818
## [2.0.2] - 2024-11-03
919

1020
- [BREAKING]: Renamed `select.offset` function's `offst` label to `offset`
@@ -176,7 +186,7 @@ about a few slight breaking changes around mostly inserts, updates and deletes.
176186
- Removed the hard dependency on any RDMBS specific
177187
library. These are now only required when developing and testing
178188
this library, but when running you can chose any of the following adapters:
179-
- `gleam_pgo`
189+
- `pog`
180190
- `sqlight`
181191
- `gmysql`
182192

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Further documentation can be found on [hexdocs.pm/cake](https://hexdocs.pm/cake)
3636

3737
### Adapters
3838

39-
- 🐘PostgreSQL on Erlang: [hex.pm/packages/cake_gleam_pgo](https://hex.pm/packages/cake_gleam_pgo)
39+
- 🐘PostgreSQL on Erlang: [hex.pm/packages/cake_pog](https://hex.pm/packages/cake_pog)
4040
- 🪶SQLite on Erlang: [hex.pm/packages/cake_sqlight](https://hex.pm/packages/cake_sqlight)
4141
- 🦭MariaDB and 🐬MySQL on Erlang: [hex.pm/packages/cake_gmysql](https://hex.pm/packages/cake_gmysql)
4242

@@ -109,7 +109,7 @@ flexible and powerful tool to compose and craft SQL read and write queries.
109109
- Not being tied to any specific dialect or dialect adapter library.
110110
- Documentation should be comprehensive.
111111
- It should be easy to use with existing gleam dialect adapters such as:
112-
- [gleam_pgo](https://hex.pm/packages/gleam_pgo)
112+
- [pog](https://hex.pm/packages/pog)
113113
- [sqlight](https://hex.pm/packages/sqlight)
114114
- [gmysql](https://hex.pm/packages/gmysql)
115115
- Allow to define custom SQL fragments while still being safe
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# erlang 26.2.5.1
22
erlang 27.0
3-
gleam 1.3.2
4-
# erlang 26.2.5.1
3+
gleam 1.5.1
54
# gleam nightly

docs/demo-apps/demos/01_select_and_decode/gleam.toml

+4-3
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ name = "cake_demo_select_and_decode"
22
description = "An demo of using Gleam with Cake and 🐘PostgreSQL to run SELECT queries and decode returning data into Gleam records"
33

44
[dependencies]
5-
cake = { path = "../../../../" }
6-
helper = { path = "../../helper" }
7-
gleam_pgo = ">= 0.13.0 and < 2.0.0"
5+
cake = { path = "../../../.." }
6+
cake_pog = ">= 1.0.3 and < 2.0.0"
87
gleam_stdlib = ">= 0.39.0 and < 2.0.0"
8+
helper = { path = "../../helper" }
9+
pog = ">= 1.0.0 and < 2.0.0"
910
pprint = ">= 1.0.3 and < 2.0.0"

docs/demo-apps/demos/01_select_and_decode/manifest.toml

+11-10
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,22 @@
33

44
packages = [
55
{ name = "backoff", version = "1.1.6", build_tools = ["rebar3"], requirements = [], otp_app = "backoff", source = "hex", outer_checksum = "CF0CFFF8995FB20562F822E5CC47D8CCF664C5ECDC26A684CBE85C225F9D7C39" },
6-
{ name = "cake", version = "0.15.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], source = "local", path = "../../../.." },
7-
{ name = "helper", version = "1.0.0", build_tools = ["gleam"], requirements = ["cake", "gleam_pgo", "gleam_stdlib", "pprint"], source = "local", path = "../../helper" },
6+
{ name = "cake", version = "2.1.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], source = "local", path = "../../../.." },
7+
{ name = "cake_pog", version = "1.0.3", build_tools = ["gleam"], requirements = ["cake", "gleam_stdlib", "pog"], otp_app = "cake_pog", source = "hex", outer_checksum = "8889AB1F7F5EE8F470882D78DC66F942341CB823631EBDFE868D3F983C380D83" },
88
{ name = "glam", version = "2.0.1", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "glam", source = "hex", outer_checksum = "66EC3BCD632E51EED029678F8DF419659C1E57B1A93D874C5131FE220DFAD2B2" },
9-
{ name = "gleam_pgo", version = "0.13.0", build_tools = ["gleam"], requirements = ["gleam_stdlib", "pgo"], otp_app = "gleam_pgo", source = "hex", outer_checksum = "6A1E7F3E717C077788254871E4EF4A8DFF58FEC07D7FA7C7702C2CCF66095AC8" },
10-
{ name = "gleam_stdlib", version = "0.39.0", build_tools = ["gleam"], requirements = [], otp_app = "gleam_stdlib", source = "hex", outer_checksum = "2D7DE885A6EA7F1D5015D1698920C9BAF7241102836CE0C3837A4F160128A9C4" },
11-
{ name = "opentelemetry_api", version = "1.3.0", build_tools = ["rebar3", "mix"], requirements = ["opentelemetry_semantic_conventions"], otp_app = "opentelemetry_api", source = "hex", outer_checksum = "B9E5FF775FD064FA098DBA3C398490B77649A352B40B0B730A6B7DC0BDD68858" },
12-
{ name = "opentelemetry_semantic_conventions", version = "0.2.0", build_tools = ["rebar3", "mix"], requirements = [], otp_app = "opentelemetry_semantic_conventions", source = "hex", outer_checksum = "D61FA1F5639EE8668D74B527E6806E0503EFC55A42DB7B5F39939D84C07D6895" },
9+
{ name = "gleam_stdlib", version = "0.41.0", build_tools = ["gleam"], requirements = [], otp_app = "gleam_stdlib", source = "hex", outer_checksum = "1B2F80CB1B66B027E3198A2FF71EF3F2F31DF89ED97AD606F25FD387A4C3C1EF" },
10+
{ name = "helper", version = "1.0.1", build_tools = ["gleam"], requirements = ["cake", "cake_pog", "gleam_stdlib", "pog", "pprint"], source = "local", path = "../../helper" },
11+
{ name = "opentelemetry_api", version = "1.4.0", build_tools = ["rebar3", "mix"], requirements = [], otp_app = "opentelemetry_api", source = "hex", outer_checksum = "3DFBBFAA2C2ED3121C5C483162836C4F9027DEF469C41578AF5EF32589FCFC58" },
1312
{ name = "pg_types", version = "0.4.0", build_tools = ["rebar3"], requirements = [], otp_app = "pg_types", source = "hex", outer_checksum = "B02EFA785CAECECF9702C681C80A9CA12A39F9161A846CE17B01FB20AEEED7EB" },
1413
{ name = "pgo", version = "0.14.0", build_tools = ["rebar3"], requirements = ["backoff", "opentelemetry_api", "pg_types"], otp_app = "pgo", source = "hex", outer_checksum = "71016C22599936E042DC0012EE4589D24C71427D266292F775EBF201D97DF9C9" },
15-
{ name = "pprint", version = "1.0.3", build_tools = ["gleam"], requirements = ["glam", "gleam_stdlib"], otp_app = "pprint", source = "hex", outer_checksum = "76BBB92E23D12D954BD452686543F29EDE8EBEBB7FC0ACCBCA66EEF276EC3A06" },
14+
{ name = "pog", version = "1.0.0", build_tools = ["gleam"], requirements = ["gleam_stdlib", "pgo"], otp_app = "pog", source = "hex", outer_checksum = "00D57120936AFBF486BE357C472E483C1F0CA507FF9C3668075E87C733CA53F8" },
15+
{ name = "pprint", version = "1.0.4", build_tools = ["gleam"], requirements = ["glam", "gleam_stdlib"], otp_app = "pprint", source = "hex", outer_checksum = "C310A98BDC0995644847C3C8702DE19656D6BCD638B2A8A358B97824379ECAA1" },
1616
]
1717

1818
[requirements]
19-
cake = { path = "../../../../" }
20-
helper = { path = "../../helper" }
21-
gleam_pgo = { version = ">= 0.13.0 and < 2.0.0" }
19+
cake = { path = "../../../.." }
20+
cake_pog = { version = ">= 1.0.3 and < 2.0.0" }
2221
gleam_stdlib = { version = ">= 0.39.0 and < 2.0.0" }
22+
helper = { path = "../../helper" }
23+
pog = { version = ">= 1.0.0 and < 2.0.0" }
2324
pprint = { version = ">= 1.0.3 and < 2.0.0" }

docs/demo-apps/demos/01_select_and_decode/src/cake_demo_select_and_decode.gleam

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import cake/adapter/postgres
12
import cake/join as j
23
import cake/select as s
34
import cake/where as w
@@ -6,7 +7,7 @@ import gleam/dynamic
67
import gleam/io
78
import gleam/list
89
import helper/demo_data
9-
import helper/postgres
10+
import helper/postgres_helper
1011
import pprint
1112

1213
fn select_query() {
@@ -33,7 +34,7 @@ fn select_query() {
3334
}
3435

3536
pub fn main() {
36-
use conn <- postgres.with_connection
37+
use conn <- postgres_helper.with_connection
3738
demo_data.create_tables_and_insert_rows(conn)
3839

3940
let assert Ok(cats) =
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
erlang 27.0
2-
gleam 1.3.0
31
# erlang 26.2.5.1
2+
erlang 27.0
3+
gleam 1.5.1
44
# gleam nightly

docs/demo-apps/demos/02_union_and_decode/gleam.toml

+4-3
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ name = "cake_demo_union_and_decode"
22
description = "An demo of using Gleam with Cake and 🐘PostgreSQL to run UNION queries and decode returning data into Gleam records"
33

44
[dependencies]
5-
cake = { path = "../../../../" }
6-
helper = { path = "../../helper" }
7-
gleam_pgo = ">= 0.13.0 and < 2.0.0"
5+
cake = { path = "../../../.." }
6+
cake_pog = ">= 1.0.3 and < 2.0.0"
87
gleam_stdlib = ">= 0.39.0 and < 2.0.0"
8+
helper = { path = "../../helper" }
9+
pog = ">= 1.0.0 and < 2.0.0"
910
pprint = ">= 1.0.3 and < 2.0.0"

docs/demo-apps/demos/02_union_and_decode/manifest.toml

+11-10
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,22 @@
33

44
packages = [
55
{ name = "backoff", version = "1.1.6", build_tools = ["rebar3"], requirements = [], otp_app = "backoff", source = "hex", outer_checksum = "CF0CFFF8995FB20562F822E5CC47D8CCF664C5ECDC26A684CBE85C225F9D7C39" },
6-
{ name = "cake", version = "0.15.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], source = "local", path = "../../../.." },
7-
{ name = "helper", version = "1.0.0", build_tools = ["gleam"], requirements = ["cake", "gleam_pgo", "gleam_stdlib", "pprint"], source = "local", path = "../../helper" },
6+
{ name = "cake", version = "2.1.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], source = "local", path = "../../../.." },
7+
{ name = "cake_pog", version = "1.0.3", build_tools = ["gleam"], requirements = ["cake", "gleam_stdlib", "pog"], otp_app = "cake_pog", source = "hex", outer_checksum = "8889AB1F7F5EE8F470882D78DC66F942341CB823631EBDFE868D3F983C380D83" },
88
{ name = "glam", version = "2.0.1", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "glam", source = "hex", outer_checksum = "66EC3BCD632E51EED029678F8DF419659C1E57B1A93D874C5131FE220DFAD2B2" },
9-
{ name = "gleam_pgo", version = "0.13.0", build_tools = ["gleam"], requirements = ["gleam_stdlib", "pgo"], otp_app = "gleam_pgo", source = "hex", outer_checksum = "6A1E7F3E717C077788254871E4EF4A8DFF58FEC07D7FA7C7702C2CCF66095AC8" },
10-
{ name = "gleam_stdlib", version = "0.39.0", build_tools = ["gleam"], requirements = [], otp_app = "gleam_stdlib", source = "hex", outer_checksum = "2D7DE885A6EA7F1D5015D1698920C9BAF7241102836CE0C3837A4F160128A9C4" },
11-
{ name = "opentelemetry_api", version = "1.3.0", build_tools = ["rebar3", "mix"], requirements = ["opentelemetry_semantic_conventions"], otp_app = "opentelemetry_api", source = "hex", outer_checksum = "B9E5FF775FD064FA098DBA3C398490B77649A352B40B0B730A6B7DC0BDD68858" },
12-
{ name = "opentelemetry_semantic_conventions", version = "0.2.0", build_tools = ["rebar3", "mix"], requirements = [], otp_app = "opentelemetry_semantic_conventions", source = "hex", outer_checksum = "D61FA1F5639EE8668D74B527E6806E0503EFC55A42DB7B5F39939D84C07D6895" },
9+
{ name = "gleam_stdlib", version = "0.41.0", build_tools = ["gleam"], requirements = [], otp_app = "gleam_stdlib", source = "hex", outer_checksum = "1B2F80CB1B66B027E3198A2FF71EF3F2F31DF89ED97AD606F25FD387A4C3C1EF" },
10+
{ name = "helper", version = "1.0.1", build_tools = ["gleam"], requirements = ["cake", "cake_pog", "gleam_stdlib", "pog", "pprint"], source = "local", path = "../../helper" },
11+
{ name = "opentelemetry_api", version = "1.4.0", build_tools = ["rebar3", "mix"], requirements = [], otp_app = "opentelemetry_api", source = "hex", outer_checksum = "3DFBBFAA2C2ED3121C5C483162836C4F9027DEF469C41578AF5EF32589FCFC58" },
1312
{ name = "pg_types", version = "0.4.0", build_tools = ["rebar3"], requirements = [], otp_app = "pg_types", source = "hex", outer_checksum = "B02EFA785CAECECF9702C681C80A9CA12A39F9161A846CE17B01FB20AEEED7EB" },
1413
{ name = "pgo", version = "0.14.0", build_tools = ["rebar3"], requirements = ["backoff", "opentelemetry_api", "pg_types"], otp_app = "pgo", source = "hex", outer_checksum = "71016C22599936E042DC0012EE4589D24C71427D266292F775EBF201D97DF9C9" },
15-
{ name = "pprint", version = "1.0.3", build_tools = ["gleam"], requirements = ["glam", "gleam_stdlib"], otp_app = "pprint", source = "hex", outer_checksum = "76BBB92E23D12D954BD452686543F29EDE8EBEBB7FC0ACCBCA66EEF276EC3A06" },
14+
{ name = "pog", version = "1.0.0", build_tools = ["gleam"], requirements = ["gleam_stdlib", "pgo"], otp_app = "pog", source = "hex", outer_checksum = "00D57120936AFBF486BE357C472E483C1F0CA507FF9C3668075E87C733CA53F8" },
15+
{ name = "pprint", version = "1.0.4", build_tools = ["gleam"], requirements = ["glam", "gleam_stdlib"], otp_app = "pprint", source = "hex", outer_checksum = "C310A98BDC0995644847C3C8702DE19656D6BCD638B2A8A358B97824379ECAA1" },
1616
]
1717

1818
[requirements]
19-
cake = { path = "../../../../" }
20-
helper = { path = "../../helper" }
21-
gleam_pgo = { version = ">= 0.13.0 and < 2.0.0" }
19+
cake = { path = "../../../.." }
20+
cake_pog = { version = ">= 1.0.3 and < 2.0.0" }
2221
gleam_stdlib = { version = ">= 0.39.0 and < 2.0.0" }
22+
helper = { path = "../../helper" }
23+
pog = { version = ">= 1.0.0 and < 2.0.0" }
2324
pprint = { version = ">= 1.0.3 and < 2.0.0" }

docs/demo-apps/demos/02_union_and_decode/src/cake_demo_union_and_decode.gleam

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
import being
2+
import cake/adapter/postgres
23
import cake/combined as c
34
import cake/select as s
45
import gleam/dynamic
56
import gleam/io
67
import gleam/list
78
import helper/demo_data
8-
import helper/postgres
9+
import helper/postgres_helper
910
import pprint
1011

1112
fn union_query() {
@@ -25,7 +26,7 @@ fn union_query() {
2526
}
2627

2728
pub fn main() {
28-
use conn <- postgres.with_connection
29+
use conn <- postgres_helper.with_connection
2930
demo_data.create_tables_and_insert_rows(conn)
3031

3132
let assert Ok(beings) =
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# erlang 26.2.5.1
22
erlang 27.0
3-
gleam 1.3.2
3+
gleam 1.5.1
44
# gleam nightly

docs/demo-apps/demos/03_insert/gleam.toml

+4-3
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ name = "cake_demo_insert"
22
description = "An demo of using Gleam with Cake and 🐘PostgreSQL to run INSERT queries"
33

44
[dependencies]
5-
cake = { path = "../../../../" }
6-
helper = { path = "../../helper" }
7-
gleam_pgo = ">= 0.13.0 and < 2.0.0"
5+
cake = { path = "../../../.." }
6+
cake_pog = ">= 1.0.3 and < 2.0.0"
87
gleam_stdlib = ">= 0.39.0 and < 2.0.0"
8+
helper = { path = "../../helper" }
9+
pog = ">= 1.0.0 and < 2.0.0"
910
pprint = ">= 1.0.3 and < 2.0.0"

docs/demo-apps/demos/03_insert/manifest.toml

+11-10
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,22 @@
33

44
packages = [
55
{ name = "backoff", version = "1.1.6", build_tools = ["rebar3"], requirements = [], otp_app = "backoff", source = "hex", outer_checksum = "CF0CFFF8995FB20562F822E5CC47D8CCF664C5ECDC26A684CBE85C225F9D7C39" },
6-
{ name = "cake", version = "0.15.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], source = "local", path = "../../../.." },
7-
{ name = "helper", version = "1.0.0", build_tools = ["gleam"], requirements = ["cake", "gleam_pgo", "gleam_stdlib", "pprint"], source = "local", path = "../../helper" },
6+
{ name = "cake", version = "2.1.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], source = "local", path = "../../../.." },
7+
{ name = "cake_pog", version = "1.0.3", build_tools = ["gleam"], requirements = ["cake", "gleam_stdlib", "pog"], otp_app = "cake_pog", source = "hex", outer_checksum = "8889AB1F7F5EE8F470882D78DC66F942341CB823631EBDFE868D3F983C380D83" },
88
{ name = "glam", version = "2.0.1", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "glam", source = "hex", outer_checksum = "66EC3BCD632E51EED029678F8DF419659C1E57B1A93D874C5131FE220DFAD2B2" },
9-
{ name = "gleam_pgo", version = "0.13.0", build_tools = ["gleam"], requirements = ["gleam_stdlib", "pgo"], otp_app = "gleam_pgo", source = "hex", outer_checksum = "6A1E7F3E717C077788254871E4EF4A8DFF58FEC07D7FA7C7702C2CCF66095AC8" },
10-
{ name = "gleam_stdlib", version = "0.39.0", build_tools = ["gleam"], requirements = [], otp_app = "gleam_stdlib", source = "hex", outer_checksum = "2D7DE885A6EA7F1D5015D1698920C9BAF7241102836CE0C3837A4F160128A9C4" },
11-
{ name = "opentelemetry_api", version = "1.3.0", build_tools = ["rebar3", "mix"], requirements = ["opentelemetry_semantic_conventions"], otp_app = "opentelemetry_api", source = "hex", outer_checksum = "B9E5FF775FD064FA098DBA3C398490B77649A352B40B0B730A6B7DC0BDD68858" },
12-
{ name = "opentelemetry_semantic_conventions", version = "0.2.0", build_tools = ["rebar3", "mix"], requirements = [], otp_app = "opentelemetry_semantic_conventions", source = "hex", outer_checksum = "D61FA1F5639EE8668D74B527E6806E0503EFC55A42DB7B5F39939D84C07D6895" },
9+
{ name = "gleam_stdlib", version = "0.41.0", build_tools = ["gleam"], requirements = [], otp_app = "gleam_stdlib", source = "hex", outer_checksum = "1B2F80CB1B66B027E3198A2FF71EF3F2F31DF89ED97AD606F25FD387A4C3C1EF" },
10+
{ name = "helper", version = "1.0.1", build_tools = ["gleam"], requirements = ["cake", "cake_pog", "gleam_stdlib", "pog", "pprint"], source = "local", path = "../../helper" },
11+
{ name = "opentelemetry_api", version = "1.4.0", build_tools = ["rebar3", "mix"], requirements = [], otp_app = "opentelemetry_api", source = "hex", outer_checksum = "3DFBBFAA2C2ED3121C5C483162836C4F9027DEF469C41578AF5EF32589FCFC58" },
1312
{ name = "pg_types", version = "0.4.0", build_tools = ["rebar3"], requirements = [], otp_app = "pg_types", source = "hex", outer_checksum = "B02EFA785CAECECF9702C681C80A9CA12A39F9161A846CE17B01FB20AEEED7EB" },
1413
{ name = "pgo", version = "0.14.0", build_tools = ["rebar3"], requirements = ["backoff", "opentelemetry_api", "pg_types"], otp_app = "pgo", source = "hex", outer_checksum = "71016C22599936E042DC0012EE4589D24C71427D266292F775EBF201D97DF9C9" },
15-
{ name = "pprint", version = "1.0.3", build_tools = ["gleam"], requirements = ["glam", "gleam_stdlib"], otp_app = "pprint", source = "hex", outer_checksum = "76BBB92E23D12D954BD452686543F29EDE8EBEBB7FC0ACCBCA66EEF276EC3A06" },
14+
{ name = "pog", version = "1.0.0", build_tools = ["gleam"], requirements = ["gleam_stdlib", "pgo"], otp_app = "pog", source = "hex", outer_checksum = "00D57120936AFBF486BE357C472E483C1F0CA507FF9C3668075E87C733CA53F8" },
15+
{ name = "pprint", version = "1.0.4", build_tools = ["gleam"], requirements = ["glam", "gleam_stdlib"], otp_app = "pprint", source = "hex", outer_checksum = "C310A98BDC0995644847C3C8702DE19656D6BCD638B2A8A358B97824379ECAA1" },
1616
]
1717

1818
[requirements]
19-
cake = { path = "../../../../" }
20-
helper = { path = "../../helper" }
21-
gleam_pgo = { version = ">= 0.13.0 and < 2.0.0" }
19+
cake = { path = "../../../.." }
20+
cake_pog = { version = ">= 1.0.3 and < 2.0.0" }
2221
gleam_stdlib = { version = ">= 0.39.0 and < 2.0.0" }
22+
helper = { path = "../../helper" }
23+
pog = { version = ">= 1.0.0 and < 2.0.0" }
2324
pprint = { version = ">= 1.0.3 and < 2.0.0" }

docs/demo-apps/demos/03_insert/src/cake_demo_insert.gleam

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
import cake/adapter/postgres
12
import cake/insert as i
23
import gleam/dynamic
34
import gleam/io
45
import helper/demo_data
5-
import helper/postgres
6+
import helper/postgres_helper
7+
68
import pprint
79

810
fn insert_query() {
@@ -17,7 +19,7 @@ fn insert_query() {
1719
}
1820

1921
pub fn main() {
20-
use conn <- postgres.with_connection
22+
use conn <- postgres_helper.with_connection
2123
demo_data.create_tables_and_insert_rows(conn)
2224

2325
let result = insert_query() |> postgres.run_write_query(dynamic.dynamic, conn)
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# erlang 26.2.5.1
22
erlang 27.0
3-
gleam 1.3.2
3+
gleam 1.5.1
44
# gleam nightly

docs/demo-apps/demos/04_delete/gleam.toml

+4-3
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ name = "cake_demo_delete"
22
description = "An demo of using Gleam with Cake and 🐘PostgreSQL to run DELETE queries"
33

44
[dependencies]
5-
cake = { path = "../../../../" }
6-
helper = { path = "../../helper" }
7-
gleam_pgo = ">= 0.13.0 and < 2.0.0"
5+
cake = { path = "../../../.." }
6+
cake_pog = ">= 1.0.3 and < 2.0.0"
87
gleam_stdlib = ">= 0.39.0 and < 2.0.0"
8+
helper = { path = "../../helper" }
9+
pog = ">= 1.0.0 and < 2.0.0"
910
pprint = ">= 1.0.3 and < 2.0.0"

0 commit comments

Comments
 (0)