From ce5bdc5f6689c255dc5a24626bcc63acd498941c Mon Sep 17 00:00:00 2001 From: Stefan Majewsky Date: Fri, 22 May 2026 14:19:54 +0200 Subject: doc proofreading --- oblast.go | 2 +- query.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/oblast.go b/oblast.go index 78b498f..00aaa3f 100644 --- a/oblast.go +++ b/oblast.go @@ -112,7 +112,7 @@ var ( _ driver.NamedValueChecker = nil ) -// PlanOption is an option that can be given to NewStore() to influence query planning for a certain type of record. +// PlanOption is an option that can be given to [NewStore] to influence query planning for a certain type of record. type PlanOption func(*planOpts) // TableNameIs is a PlanOption for record types that correspond to exactly one database table (as opposed to a join of multiple tables). diff --git a/query.go b/query.go index 853ef37..605dac4 100644 --- a/query.go +++ b/query.go @@ -45,6 +45,7 @@ func prepare(ctx context.Context, db Handle, query, operation string, inputSize // // Returns an error if any of the `records` has a non-zero value in any column marked as `db:",auto"`. // Records that already exist in the database should be handled with [Store.Update] instead. +// To automatically decide between INSERT and UPDATE on a per-record basis, use [Store.Upsert] instead. func (s Store[R]) Insert(ctx context.Context, db Handle, records ...*R) error { // NOTE: This function body should be as short as possible to reduce the binary size after monomorphization. // Any expression that does not depend on type R should be factored out into a reusable function. -- cgit v1.2.3