schemas

package
v0.2.18 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ServiceName string

ServiceName Service Name

Functions

This section is empty.

Types

type EntryKey

type EntryKey struct {
	Name  string
	Param string
}

EntryKey Cache key

func GetEntryKey

func GetEntryKey(entry IEntry) ([]EntryKey, string, error)

GetEntryKey get the cache primary Name, if not, find the default value field as id

type EntryKeys

type EntryKeys []EntryKey

EntryKeys Cache key array

func (EntryKeys) GetEntryKey

func (es EntryKeys) GetEntryKey(entryName string) string

GetEntryKey Get cache key by entity name

type IEntries

type IEntries []IEntry

IEntries Abstract entity type array

type IEntry

type IEntry interface {
	TableName() string
}

IEntry Abstract entity type

type PK

type PK []string

PK represents primary key values

func GetPKsByEntries

func GetPKsByEntries(entries interface{}) (PK, error)

GetPKsByEntries Get the primary key of the abstract entity type

func (PK) ToEntryKeys added in v0.1.8

func (pk PK) ToEntryKeys() []EntryKeys

ToEntryKeys Convert the cache key to the corresponding entity key

Jump to

Keyboard shortcuts

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