From e4c744843e740e74b824c43950b1961736ccb8ad Mon Sep 17 00:00:00 2001 From: Stefan Majewsky Date: Sun, 19 Apr 2026 14:25:13 +0200 Subject: change Store.Insert() to take arguments by pointer This increases memory overhead slightly, but when converting Gorp uses into Oblast, I saw that there is a legitimate risk of just ignoring the result value and continuing with the unupdated records. So according to the design priorities that I myself laid down, I'm sacrificing some performance for safety of use. --- TODO.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'TODO.md') diff --git a/TODO.md b/TODO.md index 57b81a1..f427337 100644 --- a/TODO.md +++ b/TODO.md @@ -1,2 +1,6 @@ -- TODO: Store.Insert should take its arguments as pointers; the risk of continuing to use the un-updated records is too great + + - TODO: consider adding an upsert, e.g. `func (Store[R]) InsertOrUpdate(db Handle, records ...*R) error`, that chooses based on whether any auto fields is non-zero -- cgit v1.2.3