import "go.chromium.org/luci/gae/impl/memory"
Package memory provides an implementation of infra/gae/libs/wrapper which backs to local memory ONLY. This is useful for unittesting, and is also used for the nested-transaction filter implementation.
To debug backend store memory access for a binary that uses this memory implementation, you may set the flag:
-luci.gae.store_trace_folder
to `/path/to/some/folder`. Every memory store will be assigned a numbered file in that folder, and all access to that store will be logged to that file. Setting this to "-" will cause the trace information to dump to stdout.
context.go datastore.go datastore_data.go datastore_index.go datastore_index_selection.go datastore_query.go datastore_query_execution.go doc.go error_markers.go info.go mail.go mail_static_lists.go memcache.go memstore.go memstore_iter.go memstore_tracing_utils.go module.go taskqueue.go taskqueue_data.go transaction.go user.go
const MaxIndexColumns = 64
MaxIndexColumns is the maximum number of index columns we're willing to support.
const MaxQueryComponents = 100
MaxQueryComponents was lifted from a hard-coded constant in dev_appserver. No idea if it's a real limit or just a convenience in the current dev appserver implementation.
func GetBinaryBounds(fq *ds.FinalizedQuery) (lower, upper []byte)
GetBinaryBounds gets the binary encoding of the upper and lower bounds of the inequality filter on fq, if any is defined. If a bound does not exist, it is nil.
NOTE: if fq specifies a descending sort order for the inequality, the bounds will be inverted, incremented, and flipped.
func NewDatastore(c context.Context, inf info.RawInterface) ds.RawInterface
NewDatastore creates a new standalone memory implementation of the datastore, suitable for embedding for doing in-memory data organization.
It's configured by default with the following settings:
* AutoIndex(true) * Consistent(true) * DisableSpecialEntities(true)
These settings can of course be changed by using the Testable interface.
Use calls UseWithAppID with the appid of "app"
UseInfo adds an implementation for:
* go.chromium.org/luci/gae/service/info
The application id wil be set to 'aid', and will not be modifiable in this context. If 'aid' contains a "~" character, it will be treated as the fully-qualified App ID and the AppID will be the string following the "~".
UseWithAppID adds implementations for the following gae services to the context:
* go.chromium.org/luci/gae/service/datastore * go.chromium.org/luci/gae/service/info * go.chromium.org/luci/gae/service/mail * go.chromium.org/luci/gae/service/memcache * go.chromium.org/luci/gae/service/taskqueue * go.chromium.org/luci/gae/service/user * go.chromium.org/luci/common/logger (using memlogger)
The application id wil be set to 'aid', and will not be modifiable in this context. If 'aid' contains a "~" character, it will be treated as the fully-qualified App ID and the AppID will be the string following the "~".
These can be retrieved with the gae.Get functions.
The implementations are all backed by an in-memory implementation, and start with an empty state.
Using this more than once per context.Context will cause a panic.
type ErrMissingIndex struct { Missing *ds.IndexDefinition // contains filtered or unexported fields }
ErrMissingIndex is returned when the current indexes are not sufficient for the current query.
func (e *ErrMissingIndex) Error() string
Package memory imports 42 packages (graph) and is imported by 9 packages. Updated 2021-01-26. Refresh now. Tools for package owners.