collection

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collection

type Collection[T any] struct {
	ItemCount int64
	PageSize  int64
	Page      int64
	List      []T
	Sort      [][]string             `json:",omitempty"`
	Summary   T                      `json:",omitempty"`
	Where     map[string]interface{} `json:",omitempty"`
	Options   *Options               `json:",omitempty"`
}

func (*Collection[T]) Fetch

func (c *Collection[T]) Fetch(ctx context.Context) error

func (Collection[T]) Limit

func (c Collection[T]) Limit() int64

func (Collection[T]) Offset

func (c Collection[T]) Offset() int64

func (*Collection[T]) Opt

func (c *Collection[T]) Opt() *Options

func (Collection[T]) Order

func (c Collection[T]) Order(db *gorm.DB) *gorm.DB

type Options

type Options struct {
	Refresh bool `json:",omitempty"`
	NoCount bool `json:",omitempty"`
}

Jump to

Keyboard shortcuts

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