database

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecuteTxWithinCtx

func ExecuteTxWithinCtx(ctx context.Context, fn func(context.Context) error) error

Note: All database implementations must support tx handling

todo: support other database types when we get there

Types

type QueryOption

type QueryOption func(*QueryOptions)

func FromProtoQueryOptions

func FromProtoQueryOptions(protoOptions *commonpb.QueryOptions) []QueryOption

func WithAscending

func WithAscending() QueryOption

func WithDescending

func WithDescending() QueryOption

func WithLimit

func WithLimit(limit int) QueryOption

func WithOrder

func WithOrder(order commonpb.QueryOptions_Order) QueryOption

func WithPagingToken

func WithPagingToken(pagingToken *commonpb.PagingToken) QueryOption

type QueryOptions

type QueryOptions struct {
	Limit       int
	PagingToken *commonpb.PagingToken
	Order       commonpb.QueryOptions_Order
}

func ApplyQueryOptions

func ApplyQueryOptions(options ...QueryOption) QueryOptions

func DefaultQueryOptions

func DefaultQueryOptions() QueryOptions

Directories

Path Synopsis
prisma

Jump to

Keyboard shortcuts

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