Documentation ¶
Overview ¶
package patchset provides types to store json patch set mapping to struct fields.
Index ¶
- type KeyPart
- type PatchSet
- func (p *PatchSet) Data() map[accesstypes.Field]any
- func (p *PatchSet) Get(field accesstypes.Field) any
- func (p *PatchSet) HasKey() bool
- func (p *PatchSet) Key(field accesstypes.Field) any
- func (p *PatchSet) Len() int
- func (p *PatchSet) PrimaryKey() PrimaryKey
- func (p *PatchSet) Set(field accesstypes.Field, value any)
- func (p *PatchSet) SetKey(field accesstypes.Field, value any)
- func (p *PatchSet) StructFields() []accesstypes.Field
- type PrimaryKey
- func (p PrimaryKey) Add(key accesstypes.Field, value any) PrimaryKey
- func (p PrimaryKey) KeySet() spanner.KeySet
- func (p PrimaryKey) Len() int
- func (p PrimaryKey) Map() map[accesstypes.Field]any
- func (p PrimaryKey) Parts() []KeyPart
- func (p PrimaryKey) RowID() string
- func (p PrimaryKey) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KeyPart ¶ added in v0.3.1
type KeyPart struct { Key accesstypes.Field Value any }
type PatchSet ¶
type PatchSet struct {
// contains filtered or unexported fields
}
func (*PatchSet) PrimaryKey ¶ added in v0.3.1
func (p *PatchSet) PrimaryKey() PrimaryKey
func (*PatchSet) SetKey ¶ added in v0.2.2
func (p *PatchSet) SetKey(field accesstypes.Field, value any)
func (*PatchSet) StructFields ¶
func (p *PatchSet) StructFields() []accesstypes.Field
type PrimaryKey ¶ added in v0.3.1
type PrimaryKey struct {
// contains filtered or unexported fields
}
PrimaryKey is an object that represents a single or composite primary key and its value.
func NewPrimaryKey ¶ added in v0.3.1
func NewPrimaryKey(key accesstypes.Field, value any) PrimaryKey
func (PrimaryKey) Add ¶ added in v0.3.1
func (p PrimaryKey) Add(key accesstypes.Field, value any) PrimaryKey
Add adds an additional column to the primary key creating a composite primary key
- PrimaryKey is immutable.
- Add returns a new PrimaryKey that should be used for all subsequent operations.
func (PrimaryKey) KeySet ¶ added in v0.3.1
func (p PrimaryKey) KeySet() spanner.KeySet
func (PrimaryKey) Len ¶ added in v0.3.1
func (p PrimaryKey) Len() int
func (PrimaryKey) Map ¶ added in v0.3.1
func (p PrimaryKey) Map() map[accesstypes.Field]any
func (PrimaryKey) Parts ¶ added in v0.3.1
func (p PrimaryKey) Parts() []KeyPart
func (PrimaryKey) RowID ¶ added in v0.3.1
func (p PrimaryKey) RowID() string
func (PrimaryKey) String ¶ added in v0.3.1
func (p PrimaryKey) String() string
Click to show internal directories.
Click to hide internal directories.