reader

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package reader defines public extension contracts for typed Datly reads.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Partition

type Partition struct {
	Table      string
	Expression string
	Args       []any
}

type PartitionRequest

type PartitionRequest struct {
	DB        *sql.DB
	View      string
	Arguments []string
}

type Partitioner

type Partitioner interface {
	Partitions(ctx context.Context, request PartitionRequest) ([]Partition, error)
}

type Reducer

type Reducer interface {
	// Reduce receives the complete typed result of a view fetch. Input order
	// is unspecified across partitions/batches; order-sensitive reducers must
	// sort explicitly. Relation readers invoke it once after all batches finish.
	Reduce(ctx context.Context, rows any) (any, error)
}

type ReducerProvider

type ReducerProvider interface {
	Reducer(ctx context.Context) Reducer
}

Jump to

Keyboard shortcuts

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