materialise_bun

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2023 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var IgnoreColumns = map[string]bool{
	"base_model": true,
}

Functions

func Columns

func Columns(val interface{}) ([]string, []string)

func ColumnsGeneric

func ColumnsGeneric[T any](val T) ([]string, []string)

func ConflictSet

func ConflictSet(cols []string) string

func WithBunUpsertRepositoryConnection

func WithBunUpsertRepositoryConnection[T any](connection runtime_bun.BunConnection) runtime.Configuration[*BunUpsertRepository[T]]

configuration

Types

type BunUpsertRepository

type BunUpsertRepository[T any] struct {
	// contains filtered or unexported fields
}

implementation

func NewBunUpsertRepository

func NewBunUpsertRepository[T any](configurations ...runtime.Configuration[*BunUpsertRepository[T]]) *BunUpsertRepository[T]

constructor

func (BunUpsertRepository[T]) Upsert

func (r BunUpsertRepository[T]) Upsert(c context.Context, m []T) error

type Tag

type Tag struct {
	Name    string
	Options map[string][]string
}

func ParseTag

func ParseTag(s string) Tag

func (Tag) HasOption

func (t Tag) HasOption(name string) bool

func (Tag) IsZero

func (t Tag) IsZero() bool

func (Tag) Option

func (t Tag) Option(name string) (string, bool)

Jump to

Keyboard shortcuts

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