spxscan

package module
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2025 License: MIT Imports: 5 Imported by: 3

README

spxscan

The spxscan package was inspired by pgxscan and provides similar functionality. Package spxscan allows scanning data into Go structs and other composite types, when working with the spanner package.

Getting Started

First, get the package by running:

go get github.com/cccteam/spxscan

Documentation

Overview

Package scan allows scanning data into Go structs and other composite types, when working with spanner library native interface.

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = spxapi.ErrNotFound

ErrNotFound is a type alias for spxapi.ErrNotFound. Deprecated: use spxapi.ErrNotFound instead.

Functions

func Get

func Get(ctx context.Context, db spxapi.Querier, dst any, statement spanner.Statement) error

Get is a package-level helper function that uses the spxapi.Default object. See API.Get for details.

func Select

func Select(ctx context.Context, db spxapi.Querier, dst any, statement spanner.Statement) error

Select is a package-level helper function that uses the spxapi.Default object. See API.Select for details.

func SelectSeq added in v0.0.4

func SelectSeq[T any](ctx context.Context, db spxapi.Querier, statement spanner.Statement) iter.Seq2[*T, error]

SelectSeq is a package-level helper function that uses the spxapi.Default object. See API.Select for details.

func UpdateAndGet added in v0.0.3

func UpdateAndGet(ctx context.Context, client spxapi.TxnRunner, dst any, statement spanner.Statement) error

UpdateAndGet is a package-level helper function that uses the spxapi.Default object. See API.UpdateAndGet for details.

func UpdateAndSelect added in v0.0.3

func UpdateAndSelect(ctx context.Context, client spxapi.TxnRunner, dst any, statement spanner.Statement) error

UpdateAndSelect is a package-level helper function that uses the spxapi.Default object. See API.UpdateAndSelect for details.

Types

type Querier

type Querier = spxapi.Querier

Querier is a type alias for spxapi.Querier. Deprecated: use spxapi.Querier instead.

type TxnRunner added in v0.0.3

type TxnRunner = spxapi.TxnRunner

TxnRunner is a type alias for spxapi.TxnRunner. Deprecated: use spxapi.TxnRunner instead.

Directories

Path Synopsis
package spxapi implements the core logic of the API type and exposes the functionality available in the package.
package spxapi implements the core logic of the API type and exposes the functionality available in the package.

Jump to

Keyboard shortcuts

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