diff options
| author | Stefan Majewsky <majewsky@gmx.net> | 2026-04-19 14:25:13 +0200 |
|---|---|---|
| committer | Stefan Majewsky <majewsky@gmx.net> | 2026-04-19 14:25:13 +0200 |
| commit | e4c744843e740e74b824c43950b1961736ccb8ad (patch) | |
| tree | 83ee79a50bf788a5e9f7f62ddf6a9ce62514936b /TODO.md | |
| parent | 6a089f6d65da3ef5391314e1ab5907083bf577fc (diff) | |
| download | go-oblast-e4c744843e740e74b824c43950b1961736ccb8ad.tar.gz | |
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.
Diffstat (limited to 'TODO.md')
| -rw-r--r-- | TODO.md | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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 +<!-- +SPDX-FileCopyrightText: 2026 Stefan Majewsky <majewsky@gmx.net> +SPDX-License-Identifier: Apache-2.0 +--> + - 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 |
