From 4b582016e34128dca038ab0c1ee3511d75fae8fd Mon Sep 17 00:00:00 2001 From: Stefan Majewsky Date: Thu, 30 Apr 2026 01:37:48 +0200 Subject: shave an allocation and memcpy from Select() and SelectWhere() --- CHANGELOG.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index b56ec45..781348e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,19 +5,23 @@ SPDX-License-Identifier: Apache-2.0 # v0.3.0 (TBD) -Changes: +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.Update()`. +- 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: -- cgit v1.2.3