datatypes

package
v0.3.0 Latest Latest
Warning

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

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

Documentation

Overview

Package datatypes GENERATED BY gengo:runtimedoc DON'T EDIT THIS FILE

Index

Constants

This section is empty.

Variables

View Source
var JSONScan = datatypes.JSONScan
View Source
var JSONValue = datatypes.JSONValue
View Source
var TimestampZero = datatypes.TimestampZero

Functions

func RightLikeOrIn

func RightLikeOrIn[T ~string](values ...T) b.ColumnValueExpr[T]

Types

type CreationTime

type CreationTime struct {
	// 创建时间
	CreatedAt Timestamp `db:"f_created_at,default='0'" json:"createdAt"`
}

func (*CreationTime) MarkCreatedAt

func (times *CreationTime) MarkCreatedAt()

func (CreationTime) RuntimeDoc

func (v CreationTime) RuntimeDoc(names ...string) ([]string, bool)

type CreationUpdationDeletionTime

type CreationUpdationDeletionTime struct {
	CreationUpdationTime
	DeletedAt Timestamp `db:"f_deleted_at,default='0'" json:"deletedAt,omitempty"`
}

func (*CreationUpdationDeletionTime) MarkDeletedAt

func (times *CreationUpdationDeletionTime) MarkDeletedAt()

func (CreationUpdationDeletionTime) RuntimeDoc

func (v CreationUpdationDeletionTime) RuntimeDoc(names ...string) ([]string, bool)

func (CreationUpdationDeletionTime) SoftDeleteFieldAndZeroValue

func (CreationUpdationDeletionTime) SoftDeleteFieldAndZeroValue() (string, driver.Value)

type CreationUpdationTime

type CreationUpdationTime struct {
	CreationTime
	UpdatedAt Timestamp `db:"f_updated_at,default='0'" json:"updatedAt"`
}

func (*CreationUpdationTime) MarkCreatedAt

func (times *CreationUpdationTime) MarkCreatedAt()

func (*CreationUpdationTime) MarkUpdatedAt

func (times *CreationUpdationTime) MarkUpdatedAt()

func (CreationUpdationTime) RuntimeDoc

func (v CreationUpdationTime) RuntimeDoc(names ...string) ([]string, bool)

type DeprecatedTime

type DeprecatedTime struct {
	// 废弃时间
	DeprecatedAt Timestamp `db:"f_deprecated_at,default='0'" json:"deprecatedAt"`
}

func (*DeprecatedTime) MarkDeprecatedAt

func (times *DeprecatedTime) MarkDeprecatedAt()

func (DeprecatedTime) RuntimeDoc

func (v DeprecatedTime) RuntimeDoc(names ...string) ([]string, bool)

type Lister

type Lister[T any, O any] interface {
	List() []*O
	New() any
	Next(v any) error
}

func NewLister

func NewLister[T any, O any](process func(i *T) (*O, error)) Lister[T, O]

type Pager

type Pager struct {
	Size   int64 `name:"size,omitempty" in:"query" default:"10" validate:"@int64[-1,]"`
	Offset int64 `name:"offset,omitempty" in:"query" default:"0" validate:"@int64[0,]"`
}

func (Pager) RuntimeDoc

func (v Pager) RuntimeDoc(names ...string) ([]string, bool)

func (*Pager) SetDefaults

func (p *Pager) SetDefaults()

type PrimaryID

type PrimaryID struct {
	// 自增 ID
	ID uint64 `db:"f_id,autoincrement" json:"-"`
}

func (PrimaryID) RuntimeDoc

func (v PrimaryID) RuntimeDoc(names ...string) ([]string, bool)

type Record

type Record[K comparable, T any] interface {
	Put(k K, v *T)
	Get(k K) *T
	Keys() []K
	Values() []*T
}

func NewRecord

func NewRecord[K comparable, T any]() Record[K, T]

type SFID

type SFID = datatypes.SFID

type Timestamp

type Timestamp = datatypes.Timestamp

Jump to

Keyboard shortcuts

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