dbchange

package
v0.0.32 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package dbchange abstrats SQL upsert operations into structs

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Change

type Change struct {
	Changes       map[string]interface{}
	OriginalValue reflect.Value
	Key           string
	Type          Type
}

Change structure

type ChangeSet

type ChangeSet struct {
	Inserts               []Change
	Updates               []Change
	Deletes               []Change
	InsertsHavePrimaryKey bool
	LookupsUsed           []tags.Lookup
}

ChangeSet structure

type Type

type Type int

Type is an enum for the type of change being made. Insert, Update or Delete

const (
	// Insert Type
	Insert Type = iota
	// Update Type
	Update
	// Delete Type
	Delete
)

Jump to

Keyboard shortcuts

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