diff options
| author | Stefan Majewsky <majewsky@gmx.net> | 2026-04-17 16:55:31 +0200 |
|---|---|---|
| committer | Stefan Majewsky <majewsky@gmx.net> | 2026-04-17 16:55:31 +0200 |
| commit | 6067fae668d8c5ca7d81874ddf258e0a73b69112 (patch) | |
| tree | 470fe83a53d78ea1a56aea52ef3c89c854d06de2 /query.go | |
| parent | d04dfa3bc58c86149064bbca672b42f660a4aebd (diff) | |
| download | go-oblast-6067fae668d8c5ca7d81874ddf258e0a73b69112.tar.gz | |
remove more instances of defer()
Diffstat (limited to 'query.go')
| -rw-r--r-- | query.go | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -139,7 +139,7 @@ func (s Store[R]) Insert(db Handle, records ...R) (returnedRecords []R, returned // Returns [MissingRecordError] if any of the records does not exist in the database, that is, if for any of the records, the database contains no row with the same primary key values. // // Returns an error if [NewStore] was called without the [TableNameIs] or [PrimaryKeyIs] options, which are both required to generate a query for this method. -func (s Store[R]) Update(db Handle, records ...R) (returnedError error) { +func (s Store[R]) Update(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. @@ -184,7 +184,7 @@ func updateRecord(v reflect.Value, recordIndex int, stmt preparedStatement, argu // Delete executes an SQL DELETE statement for each of the provided records, using their primary keys to locate the respective table rows. // // Returns an error if [NewStore] was called without the [TableNameIs] or [PrimaryKeyIs] options, which are both required to generate a query for this method. -func (s Store[R]) Delete(db Handle, records ...R) (returnedError error) { +func (s Store[R]) Delete(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. // TODO: minimize |
