delta

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

README

delta

Track changes to values after they persist to the database

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bool added in v0.1.0

type Bool struct {
	// contains filtered or unexported fields
}

Bool tracks changes to a value since it has been loaded into memory

func NewBool added in v0.1.0

func NewBool(value bool) Bool

NewBool returns a fully initialized Slice object

func (Bool) Bool added in v0.1.0

func (v Bool) Bool() bool

Bool returns the value as a bool

func (Bool) GetValue added in v0.1.0

func (v Bool) GetValue() any

GetValue implements schema.BoolGetter and returns the current value

func (Bool) IsChanged added in v0.1.0

func (v Bool) IsChanged() bool

IsChanged returns TRUE if the value has changed since it was loaded

func (Bool) IsFalse added in v0.1.0

func (v Bool) IsFalse() bool

IsFalse returns TRUE if the current value is false

func (Bool) IsTrue added in v0.1.0

func (v Bool) IsTrue() bool

IsTrue returns TRUE if the current value is true

func (Bool) IsZero added in v0.1.0

func (v Bool) IsZero() bool

IsZero returns TRUE if the current value is the zero value for this type

func (Bool) MarshalBSONValue added in v0.1.0

func (v Bool) MarshalBSONValue() (bsontype.Type, []byte, error)

MarshalBSONValue implements the bson.ValueMarshaler interface

func (Bool) MarshalJSON added in v0.1.0

func (v Bool) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface and serializes the Slice into a JSON array

func (Bool) NotChanged added in v0.1.0

func (v Bool) NotChanged() bool

NotChanged returns TRUE if the value has not changed since it was loaded

func (*Bool) Pointer added in v0.1.0

func (v *Bool) Pointer() *bool

Pointer returns a pointer to the current value

func (*Bool) Set added in v0.1.0

func (v *Bool) Set(value bool)

Set updates the current value

func (*Bool) SetValue added in v0.1.0

func (v *Bool) SetValue(value any) error

SetValue implements schema.BoolSetter and updates the current value, tracking changes to the added and deleted lists.

func (*Bool) UnmarshalBSONValue added in v0.1.0

func (v *Bool) UnmarshalBSONValue(t bsontype.Type, data []byte) error

UnmarshalBSONValue implements the bson.ValueUnmarshaler interface

func (*Bool) UnmarshalJSON added in v0.1.0

func (v *Bool) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface and deserializes the Slice from a JSON array

func (Bool) Value added in v0.1.0

func (v Bool) Value() bool

Value returns the value as a bool

type ObjectID

type ObjectID struct {
	// contains filtered or unexported fields
}

ObjectID tracks changes to a value since it has been loaded into memory

func NewObjectID

func NewObjectID(value primitive.ObjectID) ObjectID

NewObjectID returns a fully initialized Slice object

func (ObjectID) GetValue

func (v ObjectID) GetValue() any

GetValue implements schema.ObjectIDGetter and returns the current value

func (ObjectID) Hex

func (v ObjectID) Hex() string

Hex returns the value as a hex string

func (ObjectID) IsChanged

func (v ObjectID) IsChanged() bool

IsChanged returns TRUE if the value has changed since it was loaded

func (ObjectID) IsZero

func (v ObjectID) IsZero() bool

IsZero returns TRUE if the current value is the zero value for this type

func (ObjectID) MarshalBSONValue

func (v ObjectID) MarshalBSONValue() (bsontype.Type, []byte, error)

MarshalBSONValue implements the bson.ValueMarshaler interface

func (ObjectID) MarshalJSON

func (v ObjectID) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface and serializes the Slice into a JSON array

func (ObjectID) NotChanged

func (v ObjectID) NotChanged() bool

NotChanged returns TRUE if the value has not changed since it was loaded

func (*ObjectID) Pointer

func (v *ObjectID) Pointer() *primitive.ObjectID

Pointer returns a pointer to the current value

func (*ObjectID) Set

func (v *ObjectID) Set(value primitive.ObjectID)

Set updates the current value

func (*ObjectID) SetValue

func (v *ObjectID) SetValue(value any) error

SetValue implements schema.ObjectIDSetter and updates the current value, tracking changes to the added and deleted lists.

func (ObjectID) String

func (v ObjectID) String() string

String returns the value as a hex string

func (*ObjectID) UnmarshalBSONValue

func (v *ObjectID) UnmarshalBSONValue(t bsontype.Type, data []byte) error

UnmarshalBSONValue implements the bson.ValueUnmarshaler interface

func (*ObjectID) UnmarshalJSON

func (v *ObjectID) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface and deserializes the Slice from a JSON array

func (ObjectID) Value

func (v ObjectID) Value() primitive.ObjectID

Value returns the value as a primitive.ObjectID

type String

type String struct {
	// contains filtered or unexported fields
}

String tracks changes to a value since it has been loaded into memory

func NewString

func NewString(value string) String

NewString returns a fully initialized Slice object

func (String) GetValue

func (v String) GetValue() any

GetValue implements schema.StringGetter and returns the current value

func (String) IsChanged

func (v String) IsChanged() bool

IsChanged returns TRUE if the value has changed since it was loaded

func (String) IsZero

func (v String) IsZero() bool

IsZero returns TRUE if the current value is the zero value for this type

func (String) MarshalBSONValue

func (v String) MarshalBSONValue() (bsontype.Type, []byte, error)

MarshalBSONValue implements the bson.ValueMarshaler interface

func (String) MarshalJSON

func (v String) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface and serializes the Slice into a JSON array

func (String) NotChanged

func (v String) NotChanged() bool

NotChanged returns TRUE if the value has not changed since it was loaded

func (*String) Pointer

func (v *String) Pointer() *string

Pointer returns a pointer to the current value

func (*String) Set

func (v *String) Set(value string)

Set updates the current value

func (*String) SetValue

func (v *String) SetValue(value any) error

SetValue implements schema.StringSetter and updates the current value, tracking changes to the added and deleted lists.

func (String) String

func (v String) String() string

String returns the value as a string

func (*String) UnmarshalBSONValue

func (v *String) UnmarshalBSONValue(t bsontype.Type, data []byte) error

UnmarshalBSONValue implements the bson.ValueUnmarshaler interface

func (*String) UnmarshalJSON

func (v *String) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface and deserializes the Slice from a JSON array

func (String) Value

func (v String) Value() string

Value returns the value as a string

Jump to

Keyboard shortcuts

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