iface

package
v1.36.3 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cursor

type Cursor interface {
	String() string
}

Cursor represents a position in a query result set

type Iterator

type Iterator interface {
	Next(dst interface{}) (Key, error)
	Cursor() (Cursor, error)
}

Iterator is the interface for datastore query iterators

type Key

type Key interface {
	AppID() string
	Encode() string
	Equal(o Key) bool
	GobDecode(buf []byte) error
	GobEncode() ([]byte, error)
	Incomplete() bool
	IntID() int64
	Kind() string
	MarshalJSON() ([]byte, error)
	Namespace() string
	Parent() Key
	String() string
	StringID() string
	UnmarshalJSON(buf []byte) error
}

Key is the interface for datastore keys. This is compatible with both the legacy appengine datastore and the new db.Key interface.

type Query

type Query interface {
	Ancestor(ancestor Key) Query
	Count() (int, error)
	Distinct() Query
	EventualConsistency() Query
	Filter(filterStr string, value interface{}) Query
	KeysOnly() Query
	Limit(limit int) Query
	Offset(offset int) Query
	Order(fieldName string) Query
	Project(fieldNames ...string) Query
	Run() Iterator
	Start(c Cursor) Query
	End(c Cursor) Query
	ByKey(key Key, dst interface{}) (Key, bool, error)
	ById(id string, dst interface{}) (Key, bool, error)
	IdExists(id string) (Key, bool, error)
	KeyExists(key Key) (bool, error)
	First(dst interface{}) (Key, bool, error)
	FirstKey() (Key, bool, error)
	GetAll(dst interface{}) ([]Key, error)
	GetModels(dst interface{}) error
	GetKeys() ([]Key, error)
}

Query is the interface for datastore queries. This is compatible with both the legacy appengine datastore and the new db.Query interface.

Jump to

Keyboard shortcuts

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