entity

package
v0.0.0-...-13b24d6 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 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 Entity

type Entity interface {
	GetIDQuery() string
	GetIDArgs() []interface{}
	GetAllQuery() string
	GetAllQueryArgs() []interface{}
	GetNext() Entity
	BindRow(row Scanner) error
	GetFreshSaveQuery() string
	GetFreshSaveArgs() []interface{}
	GetSaveQuery() string
	GetSaveArgs() []interface{}
	GetDeleteQuery() string
	GetDeleteArgs() []interface{}
}

Entity is used to provide the set of functionalities common around database operations on a table.

type RawEntity

type RawEntity interface {
	GetQueryRow(code int) string
	GetQueryRowArgs(code int) []interface{}
	GetQuery(code int) string
	GetQueryArgs(code int) []interface{}
	GetNext() RawEntity
	BindRow(code int, row Scanner) error
	GetExec(code int) string
	GetExecArgs(code int) []interface{}
}

RawEntity is used to provide the set of raw functionalities around the database operations on a table.

type RawExec

type RawExec struct {
	Entity RawEntity
	Code   int
}

RawExec is the structure for the entity and the code

type Scanner

type Scanner interface {
	Scan(ctx context.Context, values ...interface{}) error
	ScanStructure(ctx context.Context, value interface{}) error
}

Scanner is used to scan the data to the respective types.

Jump to

Keyboard shortcuts

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