Help us shape the future of Go! Take the 2026 Go Developer Survey

dbchange

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	Operation     OperationType   `json:"operation"`
	ID            string          `json:"id"`
	Table         string          `json:"table"`
	Key           []string        `json:"key"`
	Version       *int64          `json:"version,omitempty"`
	ModelVersion  string          `json:"modelVersion"`
	Region        string          `json:"region"`
	CompanyID     *string         `json:"companyId,omitempty"`
	LocationID    *string         `json:"locationId,omitempty"`
	SessionID     *string         `json:"sessionId,omitempty"`
	UserID        *string         `json:"userId,omitempty"`
	Before        json.RawMessage `json:"before,omitempty"`
	After         json.RawMessage `json:"after,omitempty"`
	Diff          []string        `json:"diff,omitempty"`
	Timestamp     int64           `json:"timestamp"`
	MVCCTimestamp string          `json:"mvccTimestamp"`
	// contains filtered or unexported fields
}

Event represents a change record from the database.

func (*Event) Get

func (c *Event) Get(res any) error

func (*Event) GetObject

func (c *Event) GetObject() (map[string]any, error)

func (*Event) GetPrimaryKey

func (c *Event) GetPrimaryKey() string

func (*Event) String

func (c *Event) String() string

type OperationType added in v0.1.1

type OperationType string
const (
	OperationInsert OperationType = "INSERT"
	OperationUpdate OperationType = "UPDATE"
	OperationDelete OperationType = "DELETE"
)

Jump to

Keyboard shortcuts

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