From 71d4c873bd12233b585637404115cfea9462c904 Mon Sep 17 00:00:00 2001 From: Stefan Majewsky Date: Thu, 30 Apr 2026 00:56:09 +0200 Subject: add ctx arguments to most methods --- CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index 948bb2e..b56ec45 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,11 +7,14 @@ SPDX-License-Identifier: Apache-2.0 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()`. - Removed support for SQL dialects that rely on LastInsertId() for ID columns. - Using a RETURNING clause to collect autogenerated field values is objectively better in every way, + 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. -- cgit v1.2.3