datastoreio

package
v2.59.0 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2024 License: Apache-2.0, BSD-3-Clause, MIT Imports: 14 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