From 764eaf643e323b92a616fc8e6a193855bb43d905 Mon Sep 17 00:00:00 2001 From: Stefan Majewsky Date: Fri, 22 May 2026 14:01:24 +0200 Subject: bring back support for LastInsertId-based INSERT As the remaining TODO noted, this really is much more memory-efficient than QueryRow when we can use it, since it does not allocate an *sql.Rows instance inside the *sql.Row instance where we call Scan(). --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index a311b01..41dcdfd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,14 @@ SPDX-FileCopyrightText: 2026 Stefan Majewsky SPDX-License-Identifier: Apache-2.0 --> +# v0.10.0 (TBD) + +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: -- cgit v1.2.3