predicate

package
v0.0.0-...-f7d1ac2 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InMemoryPredicate

type InMemoryPredicate interface {
	ApplyToInMemory([]internal.InstanceWithOperation)
}

InMemoryPredicate allows to apply predicates for InMemory queries.

type PostgresPredicate

type PostgresPredicate interface {
	ApplyToPostgres(*dbr.SelectStmt)
}

PostgresPredicate allows to apply predicates for Postgres queries.

type Predicate

type Predicate interface {
	PostgresPredicate
	InMemoryPredicate
}

Predicate defines interface which allows to make a generic func signature between different driver implementations

type SortByCreatedAt

type SortByCreatedAt struct{}

func SortAscByCreatedAt

func SortAscByCreatedAt() SortByCreatedAt

SortAscByCreatedAt sorts the query output based on CreatedAt field on Instance.

func (SortByCreatedAt) ApplyToInMemory

func (w SortByCreatedAt) ApplyToInMemory(in []internal.InstanceWithOperation)

TODO: It can be more generic but right now there's no reason to complicate it.

func (SortByCreatedAt) ApplyToPostgres

func (w SortByCreatedAt) ApplyToPostgres(stmt *dbr.SelectStmt)

Jump to

Keyboard shortcuts

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