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 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.