datastoreio

package
v2.25.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package datastoreio provides transformations and utilities to interact with Google Datastore. See also: https://cloud.google.com/datastore/docs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Read

func Read(s beam.Scope, project, kind string, shards int, t reflect.Type, typeKey string) beam.PCollection

Read reads all rows from the given kind. The kind must have a schema compatible with the given type, t, and Read returns a PCollection<t>. You must also register your type with runtime.RegisterType which allows you to implement datastore.PropertyLoadSaver

Example: type Item struct {} itemKey = runtime.RegisterType(reflect.TypeOf((*Item)(nil)).Elem())

datastoreio.Read(s, "project", "Item", 256, reflect.TypeOf(Item{}), itemKey)

Types

type BoundedQuery

type BoundedQuery struct {
	Start *datastore.Key `json:"start"`
	End   *datastore.Key `json:"end"`
}

BoundedQuery represents a datastore Query with a bounded key range between [Start, End)

Jump to

Keyboard shortcuts

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