scur

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeCursorParameters

func DecodeCursorParameters(cursor *Cursor, s string) error

DecodeCursorParameters into Cursor.

Types

type Cursor

type Cursor struct {
	// contains filtered or unexported fields
}

func New

func New() *Cursor

func (*Cursor) Clone

func (cursor *Cursor) Clone() *Cursor

func (*Cursor) EncodeParameters

func (cursor *Cursor) EncodeParameters() (string, error)

EncodeParameters is encode cursor parameters value to string format.

func (*Cursor) OrderByExpression

func (cursor *Cursor) OrderByExpression() (string, error)

OrderByExpression returns part of order by expression likes "A ASC, B DESC".

func (*Cursor) Push

func (cursor *Cursor) Push(p *CursorParameter)

func (*Cursor) SetValue

func (cursor *Cursor) SetValue(obj interface{})

func (*Cursor) Unshift

func (cursor *Cursor) Unshift(p *CursorParameter)

func (*Cursor) WhereExpression

func (cursor *Cursor) WhereExpression() (string, map[string]interface{}, error)

WhereExpression returns part of where expression about cursor.

type CursorParameter

type CursorParameter struct {
	Name    string
	Order   Order
	ToValue func(obj interface{}) interface{}
	Value   interface{}
}

CursorParameter is single column info for spanner cursor.

type Order

type Order int

Order means sort order in spanner query.

const (
	// OrderAsc represent of ASC order.
	OrderAsc Order = iota
	// OrderDesc represent of DESC order.
	OrderDesc
)

func (Order) String

func (order Order) String() string

Jump to

Keyboard shortcuts

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