specific

package
v1.7.4 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2026 License: GPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseSpecificQuerySet

type BaseSpecificQuerySet[ORIGINAL attrs.Definer, SPECIFIC attrs.Definer, QS queries.NullQuerySet[ORIGINAL, QS]] interface {
	queries.BaseReadQuerySet[Specific[ORIGINAL, SPECIFIC], *SpecificQuerySet[ORIGINAL, SPECIFIC, QS]]
	queries.BaseWriteQuerySet[ORIGINAL, *SpecificQuerySet[ORIGINAL, SPECIFIC, QS]]
}

type Specific

type Specific[ORIGINAL attrs.Definer, SPECIFIC attrs.Definer] struct {
	Original ORIGINAL
	Specific SPECIFIC
}

type SpecificQuerySet

type SpecificQuerySet[ORIGINAL attrs.Definer, SPECIFIC attrs.Definer, QS queries.NullQuerySet[ORIGINAL, QS]] struct {
	*queries.WrappedQuerySet[ORIGINAL, *SpecificQuerySet[ORIGINAL, SPECIFIC, QS], QS]
	// contains filtered or unexported fields
}

func GetSpecificQuerySet

func GetSpecificQuerySet[ORIGINAL attrs.Definer, SPECIFIC attrs.Definer, QS queries.NullQuerySet[ORIGINAL, QS]](qs QS, opts SpecificQuerySetOptions[ORIGINAL, SPECIFIC]) *SpecificQuerySet[ORIGINAL, SPECIFIC, QS]

func (*SpecificQuerySet[ORIGINAL, SPECIFIC, QS]) All

func (qs *SpecificQuerySet[ORIGINAL, SPECIFIC, QS]) All() (queries.Rows[Specific[ORIGINAL, SPECIFIC]], error)

func (*SpecificQuerySet[ORIGINAL, SPECIFIC, QS]) CloneQuerySet

func (qs *SpecificQuerySet[ORIGINAL, SPECIFIC, QS]) CloneQuerySet(wrapped *queries.WrappedQuerySet[ORIGINAL, *SpecificQuerySet[ORIGINAL, SPECIFIC, QS], QS]) *SpecificQuerySet[ORIGINAL, SPECIFIC, QS]

func (*SpecificQuerySet[ORIGINAL, SPECIFIC, QS]) First

func (qs *SpecificQuerySet[ORIGINAL, SPECIFIC, QS]) First() (*queries.Row[Specific[ORIGINAL, SPECIFIC]], error)

First is used to retrieve the first row from the database.

It returns a Query that can be executed to get the result, which is a Row object that contains the model object and a map of annotations.

func (*SpecificQuerySet[ORIGINAL, SPECIFIC, QS]) Get

func (qs *SpecificQuerySet[ORIGINAL, SPECIFIC, QS]) Get() (*queries.Row[Specific[ORIGINAL, SPECIFIC]], error)

func (*SpecificQuerySet[ORIGINAL, SPECIFIC, QS]) IterAll

func (qs *SpecificQuerySet[ORIGINAL, SPECIFIC, QS]) IterAll() (int, iter.Seq2[*queries.Row[Specific[ORIGINAL, SPECIFIC]], error], error)

func (*SpecificQuerySet[ORIGINAL, SPECIFIC, QS]) Last

func (qs *SpecificQuerySet[ORIGINAL, SPECIFIC, QS]) Last() (*queries.Row[Specific[ORIGINAL, SPECIFIC]], error)

Last is used to retrieve the last row from the database.

It reverses the order of the results and then calls First to get the last row.

It returns a Query that can be executed to get the result, which is a Row object that contains the model object and a map of annotations.

type SpecificQuerySetOptions

type SpecificQuerySetOptions[ORIGINAL attrs.Definer, SPECIFIC attrs.Definer] struct {
	GetSpecificQuerySet    func(targetContentType *contenttypes.ContentTypeDefinition, target SPECIFIC) queries.BaseReadQuerySet[SPECIFIC, *queries.QuerySet[SPECIFIC]]
	GetSpecificPreloadData func(obj ORIGINAL) (id any, contentType string, ok bool)
	GetSpecificTargetID    func(target SPECIFIC) (id any, ok bool)
}

Jump to

Keyboard shortcuts

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