record

package
v2.24.1 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: MIT Imports: 3 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultRecord

type DefaultRecord struct{}

DefaultRecord implements the Key() as "id"

func (*DefaultRecord) Key

func (record *DefaultRecord) Key() string

Key returns "ID" as the default Primary Key

type ListOptions

type ListOptions struct {
	Limit  uint
	Offset uint
}

ListOptions provide limit and filtering capabilities for the List function

func NewListOptions

func NewListOptions[T constraints.Integer](limit T, offset T) *ListOptions

NewListOptions generates a ListOptions

type PrimaryKeyValue

type PrimaryKeyValue struct {
	// contains filtered or unexported fields
}

PrimaryKeyValue limits keys to string or int

func NewPrimaryKey

func NewPrimaryKey(value interface{}) (pk PrimaryKeyValue)

NewPrimaryKey returns a populated PrimaryKeyValue

func (PrimaryKeyValue) Value

func (pk PrimaryKeyValue) Value() interface{}

Value returns the string or integer value for a Record

type Record

type Record interface {
	// Initialize sets any expected values on a Record during Create
	Initialize()
	// PrimaryKey returns the value of the primary key of the Record
	PrimaryKey() PrimaryKeyValue
	// Key returns the name of the primary key of the Record
	Key() string
	// Meta returns the meta object for this Record
	Meta() qb.Table
}

Record defines a database enabled record

Jump to

Keyboard shortcuts

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