groveset

package
v1.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 3, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package groveset lists the columns a grove model-based UPDATE writes, with their values. A store uses it to build that SET by hand when one column has to take an expression, such as version = version + 1, which a model-based UPDATE cannot express and which explicit Set calls replace wholesale.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Column

type Column struct {
	Name  string
	Value any
}

Column is one column of the SET and the value it is set to.

func Columns

func Columns(model any, skip ...string) ([]Column, error)

Columns returns the columns a model-based UPDATE of model would set, in field order, leaving out any named in skip. It picks fields the way the grove drivers do: every mapped field except the primary key, scanonly and autoincrement fields. Values are passed as the fields hold them, which is also what the drivers bind for a field without nullzero.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL