gormrelay

package
v0.0.0-...-7bb74a7 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewKeysetAdapter

func NewKeysetAdapter[T any](db *gorm.DB) relay.ApplyCursorsFunc[T]

func NewKeysetFinder

func NewKeysetFinder[T any](db *gorm.DB) cursor.KeysetFinder[T]

func NewOffsetAdapter

func NewOffsetAdapter[T any](db *gorm.DB) relay.ApplyCursorsFunc[T]

func NewOffsetFinder

func NewOffsetFinder[T any](db *gorm.DB) cursor.OffsetFinder[T]

Types

type KeysetCounter

type KeysetCounter[T any] struct {
	// contains filtered or unexported fields
}

func NewKeysetCounter

func NewKeysetCounter[T any](db *gorm.DB) *KeysetCounter[T]

func (*KeysetCounter[T]) Count

func (a *KeysetCounter[T]) Count(ctx context.Context) (int, error)

func (*KeysetCounter[T]) Find

func (a *KeysetCounter[T]) Find(ctx context.Context, after, before *map[string]any, orderBys []relay.OrderBy, limit int, fromLast bool) ([]T, error)

type OffsetCounter

type OffsetCounter[T any] struct {
	// contains filtered or unexported fields
}

func NewOffsetCounter

func NewOffsetCounter[T any](db *gorm.DB) *OffsetCounter[T]

func (*OffsetCounter[T]) Count

func (a *OffsetCounter[T]) Count(ctx context.Context) (int, error)

func (*OffsetCounter[T]) Find

func (a *OffsetCounter[T]) Find(ctx context.Context, orderBys []relay.OrderBy, skip, limit int) ([]T, error)

Jump to

Keyboard shortcuts

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