1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
|
<!--
SPDX-FileCopyrightText: 2026 Stefan Majewsky <majewsky@gmx.net>
SPDX-License-Identifier: Apache-2.0
-->
# v0.13.2 (2026-07-31)
No changes to the previous version. After v0.13.1 also failed, I noticed that `git clone` on the primary repo fails with `Cannot obtain needed object 96727093c88e5db251c55eda31700bf67c832ce1 while processing commit 238b5820a9968cb4c775fd9cf2e7e2cfeb24c78e.`, the former being the digest of the `v0.1.0` tag object. No idea why, but a `git repack -adf` on the primary repo (i.e. the bare repo on the server) fixed that. However, the Go module proxy seems to once again have cached the fetch error, so here we go again with yet another release. Fingers crossed that this one will be picked up.
# v0.13.1 (2026-07-31)
No changes to the previous version. The Go module proxy refused to pick up v0.13.0 because the tag was pushed before the `main` branch was updated. Hopefully it will pick up this release.
# v0.13.0 (2026-07-31)
API changes:
- The types `Handle`, `DB`, `Conn` and `Tx` have moved to `go.xyrillian.de/gg/gsql`.
# v0.12.0 (2026-07-17)
Changes:
- Computations performed during `NewStore` are now cached, thus improving performance for repeated calls with the same arguments,
at the extra cost of one mutex read lock (amortized) per call.
# v0.11.0 (2026-07-17)
API changes:
- Add type `Selection`.
- Change methods `Store.Select`, `Store.SelectWhere` and `PreparedSelectQuery.Select` to return type `Selection`.
The old behavior can be obtained by chaining a call to `Selection.Collect` immediately afterwards.
# v0.10.0 (2026-05-22)
Changes:
- Dialects that support it (i.e. MariaDB and SQLite) will once again prefer collecting autogenerated IDs through `LastInsertId()`.
RETURNING clauses will only be used when multiple fields have the `db:",auto"` tag.
This improves memory consumption for INSERT and UPSERT queries on those dialects.
# v0.9.0 (2026-05-18)
API changes:
- The generic function `Wrap` is replaced with explicit functions `NewDB`, `NewConn` and `NewTx` that yield separate types.
This allows our wrapped types to carry the original types from database/sql as embedded types, thus making their use more ergonomic.
# v0.8.0 (2026-05-13)
API changes:
- `Wrap` now returns a struct type `SqlHandle` instead of the interface type `Handle`.
This enables reaching into the `SqlHandle` and getting the original `*sql.DB` and `*sql.Tx` back out,
which is more ergonomic in situations where Oblast loads/stores need to be mixed with other types of DB operations.
Changes:
- Insert, Upsert, Update and Delete will no longer panic when one of the fields they need to access is within a pointer-to-struct that is nil.
Instead, an error will be returned in a controlled manner.
# v0.7.0 (2026-05-12)
API changes:
- The `Handle` type changes to not cover `*sql.DB` and `*sql.Tx` directly, thus removing the direct dependency on database/sql.
This adds a new memory allocation (for wrapping `*sql.DB` or `*sql.Tx` in the wrapper implementing `Handle`)
and some CPU overhead because of the interface indirection, but I consider this a worthwhile tradeoff
to enable the use of non-standard database drivers like <https://github.com/jackc/pgx>
(if the user provides the respective custom implementation of the `Handle` interface).
Preliminary benchmarking has already shown that, for the PostgreSQL case, oblast + jackc/pgx is significantly more efficient than oblast + lib/pq.
Changes:
- Added escaping to `Dialect.QuoteIdentifier` implementations to reduce attack surface for SQL injection.
# v0.6.0 (2026-05-08)
API changes:
- Add `type RuntimeIndex`.
# v0.5.0 (2026-05-08)
API changes:
- Offer both `None`-returning and `sql.ErrNoRows`-returning variants for `Store.SelectOne...` functions.
Testing in real-world application code indicates that both return signatures have their uses.
# v0.4.0 (2026-05-04)
API changes:
- Return `None` instead of `sql.ErrNoRows` from `Store.SelectOne...` functions.
# v0.3.0 (2026-04-30)
API changes:
- All `Store` methods that run DB operations now take a `context.Context` argument.
The previous decision to avoid `ctx` arguments was based on benchmarking using `b.Context()`,
where it turns out that we just benchmarked those particular stacked contexts being inefficient.
- `Store.Insert()` now takes its arguments by-pointer. This is probably slightly less efficient,
but significantly safer because autogenerated field values cannot be disregarded by accident.
- Add `Store.Upsert()`.
- Removed support for SQL dialects that rely on LastInsertId() for ID columns.
Using a RETURNING clause to collect autogenerated field values is better in many ways,
and has been supported by both MariaDB and SQLite for at least six years.
In practice, this only drops support specifically for Oracle MySQL.
Other changes:
- Removed an unnecessary memory allocation and copy within `Select()` and `SelectWhere()`.
# v0.2.0 (2026-04-18)
Changes:
- Add `func StructTagKeyIs()`.
# v0.1.0 (2026-04-18)
Initial release. This release has code quality worthy of a 1.x version number,
but I want to test it in real applications first before committing to API stability.
|