generator

package
v0.0.0-...-0236cb5 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConfiguredGenerator

func GetConfiguredGenerator(t spansql.Type, col *config.Column) (data.Generator, error)

func GetDataGeneratorMap

func GetDataGeneratorMap(cfg config.Config, s schema.Schema) (map[string]data.GeneratorMap, error)

func GetDataGeneratorMapForTable

func GetDataGeneratorMapForTable(cfg config.Config, t schema.Table) (data.GeneratorMap, error)

TODO: Check that schema column and config column are compatible types TODO: Check that generator config and column type are compatible types

func GetDefaultGeneratorForType

func GetDefaultGeneratorForType(t spansql.Type, cfg data.Config) (data.Generator, error)

GetDefaultGeneratorForType will assemble a generator for a spanner column type. If a config is passed, it will us that config when initializing the generator

func GetReadGeneratorMap

func GetReadGeneratorMap(samples map[string]interface{}, cols []string) (*sample.SampleGenerator, error)

func SampleTable

func SampleTable(cfg *config.Config, ctx context.Context, client *spanner.Client, table schema.Table) (map[string]interface{}, error)

func SetDataConfigFromRange

func SetDataConfigFromRange(cpCfg data.Config, r *config.Range)

SetDataConfigFromRange will set values from a range in the data.Config if they're defined

Types

This section is empty.

Directories

Path Synopsis
package sample is used to sample rows from a table in order to generate point reads
package sample is used to sample rows from a table in order to generate point reads
selector package provides a mechanism for selecting between things
selector package provides a mechanism for selecting between things

Jump to

Keyboard shortcuts

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