Documentation ¶
Index ¶
- type BatchGetLineItemsRowsQuery
- type BatchGetShipmentsRowsQuery
- type BatchGetShippersRowsQuery
- type BatchGetSitesRowsQuery
- type ColumnDescriptor
- type DatabaseDescriptor
- type GetLineItemsRowQuery
- type GetShipmentsRowQuery
- type GetShippersRowQuery
- type GetSitesRowQuery
- type LineItemsKey
- type LineItemsRow
- func (*LineItemsRow) ColumnExprs() []spansql.Expr
- func (*LineItemsRow) ColumnIDs() []spansql.ID
- func (*LineItemsRow) ColumnNames() []string
- func (r *LineItemsRow) Key() LineItemsKey
- func (r *LineItemsRow) Mutate() (string, []string, []interface{})
- func (r *LineItemsRow) MutateColumns(columns []string) (string, []string, []interface{})
- func (r *LineItemsRow) MutatePresentColumns() (string, []string, []interface{})
- func (r *LineItemsRow) UnmarshalSpannerRow(row *spanner.Row) error
- func (r *LineItemsRow) Validate() error
- type LineItemsRowIterator
- type LineItemsTableDescriptor
- type ListLineItemsRowsQuery
- type ListShipmentsRowsQuery
- type ListShippersRowsQuery
- type ListSitesRowsQuery
- type ReadTransaction
- func (t ReadTransaction) BatchGetLineItemsRows(ctx context.Context, query BatchGetLineItemsRowsQuery) (map[LineItemsKey]*LineItemsRow, error)
- func (t ReadTransaction) BatchGetShipmentsRows(ctx context.Context, query BatchGetShipmentsRowsQuery) (map[ShipmentsKey]*ShipmentsRow, error)
- func (t ReadTransaction) BatchGetShippersRows(ctx context.Context, query BatchGetShippersRowsQuery) (map[ShippersKey]*ShippersRow, error)
- func (t ReadTransaction) BatchGetSitesRows(ctx context.Context, query BatchGetSitesRowsQuery) (map[SitesKey]*SitesRow, error)
- func (t ReadTransaction) GetLineItemsRow(ctx context.Context, query GetLineItemsRowQuery) (*LineItemsRow, error)
- func (t ReadTransaction) GetShipmentsRow(ctx context.Context, query GetShipmentsRowQuery) (*ShipmentsRow, error)
- func (t ReadTransaction) GetShippersRow(ctx context.Context, query GetShippersRowQuery) (*ShippersRow, error)
- func (t ReadTransaction) GetSitesRow(ctx context.Context, query GetSitesRowQuery) (*SitesRow, error)
- func (t ReadTransaction) ListLineItemsRows(ctx context.Context, query ListLineItemsRowsQuery) LineItemsRowIterator
- func (t ReadTransaction) ListShipmentsRows(ctx context.Context, query ListShipmentsRowsQuery) ShipmentsRowIterator
- func (t ReadTransaction) ListShippersRows(ctx context.Context, query ListShippersRowsQuery) ShippersRowIterator
- func (t ReadTransaction) ListSitesRows(ctx context.Context, query ListSitesRowsQuery) SitesRowIterator
- func (t ReadTransaction) ReadLineItemsRows(ctx context.Context, keySet spanner.KeySet) LineItemsRowIterator
- func (t ReadTransaction) ReadShipmentsRows(ctx context.Context, keySet spanner.KeySet) ShipmentsRowIterator
- func (t ReadTransaction) ReadShippersRows(ctx context.Context, keySet spanner.KeySet) ShippersRowIterator
- func (t ReadTransaction) ReadSitesRows(ctx context.Context, keySet spanner.KeySet) SitesRowIterator
- type ShipmentsKey
- type ShipmentsRow
- func (*ShipmentsRow) ColumnExprs() []spansql.Expr
- func (*ShipmentsRow) ColumnIDs() []spansql.ID
- func (*ShipmentsRow) ColumnNames() []string
- func (r *ShipmentsRow) Key() ShipmentsKey
- func (r *ShipmentsRow) Mutate() (string, []string, []interface{})
- func (r *ShipmentsRow) MutateColumns(columns []string) (string, []string, []interface{})
- func (r *ShipmentsRow) MutatePresentColumns() (string, []string, []interface{})
- func (r *ShipmentsRow) UnmarshalSpannerRow(row *spanner.Row) error
- func (r *ShipmentsRow) Validate() error
- type ShipmentsRowIterator
- type ShipmentsTableDescriptor
- type ShippersKey
- type ShippersRow
- func (*ShippersRow) ColumnExprs() []spansql.Expr
- func (*ShippersRow) ColumnIDs() []spansql.ID
- func (*ShippersRow) ColumnNames() []string
- func (r *ShippersRow) Key() ShippersKey
- func (r *ShippersRow) Mutate() (string, []string, []interface{})
- func (r *ShippersRow) MutateColumns(columns []string) (string, []string, []interface{})
- func (r *ShippersRow) MutatePresentColumns() (string, []string, []interface{})
- func (r *ShippersRow) UnmarshalSpannerRow(row *spanner.Row) error
- func (r *ShippersRow) Validate() error
- type ShippersRowIterator
- type ShippersTableDescriptor
- type SitesKey
- type SitesRow
- func (*SitesRow) ColumnExprs() []spansql.Expr
- func (*SitesRow) ColumnIDs() []spansql.ID
- func (*SitesRow) ColumnNames() []string
- func (r *SitesRow) Key() SitesKey
- func (r *SitesRow) Mutate() (string, []string, []interface{})
- func (r *SitesRow) MutateColumns(columns []string) (string, []string, []interface{})
- func (r *SitesRow) MutatePresentColumns() (string, []string, []interface{})
- func (r *SitesRow) UnmarshalSpannerRow(row *spanner.Row) error
- func (r *SitesRow) Validate() error
- type SitesRowIterator
- type SitesTableDescriptor
- type SpannerReadTransaction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BatchGetLineItemsRowsQuery ¶ added in v0.16.0
type BatchGetLineItemsRowsQuery struct {
Keys []LineItemsKey
}
type BatchGetShipmentsRowsQuery ¶ added in v0.16.0
type BatchGetShipmentsRowsQuery struct { Keys []ShipmentsKey LineItems bool }
type BatchGetShippersRowsQuery ¶ added in v0.16.0
type BatchGetShippersRowsQuery struct { Keys []ShippersKey Shipments bool LineItems bool }
type BatchGetSitesRowsQuery ¶ added in v0.16.0
type BatchGetSitesRowsQuery struct {
Keys []SitesKey
}
type ColumnDescriptor ¶
type DatabaseDescriptor ¶
type DatabaseDescriptor interface { Shippers() ShippersTableDescriptor Sites() SitesTableDescriptor Shipments() ShipmentsTableDescriptor LineItems() LineItemsTableDescriptor }
func Descriptor ¶
func Descriptor() DatabaseDescriptor
type GetLineItemsRowQuery ¶ added in v0.16.0
type GetLineItemsRowQuery struct {
Key LineItemsKey
}
type GetShipmentsRowQuery ¶ added in v0.16.0
type GetShipmentsRowQuery struct { Key ShipmentsKey LineItems bool }
type GetShippersRowQuery ¶ added in v0.16.0
type GetShippersRowQuery struct { Key ShippersKey Shipments bool LineItems bool }
type GetSitesRowQuery ¶ added in v0.16.0
type GetSitesRowQuery struct {
Key SitesKey
}
type LineItemsKey ¶
func (LineItemsKey) BoolExpr ¶
func (k LineItemsKey) BoolExpr() spansql.BoolExpr
func (LineItemsKey) Delete ¶
func (k LineItemsKey) Delete() *spanner.Mutation
func (LineItemsKey) Order ¶
func (LineItemsKey) Order() []spansql.Order
func (LineItemsKey) SpannerKey ¶
func (k LineItemsKey) SpannerKey() spanner.Key
func (LineItemsKey) SpannerKeySet ¶
func (k LineItemsKey) SpannerKeySet() spanner.KeySet
type LineItemsRow ¶
type LineItemsRow struct { ShipperId string `spanner:"shipper_id"` ShipmentId string `spanner:"shipment_id"` LineNumber int64 `spanner:"line_number"` Title spanner.NullString `spanner:"title"` Quantity spanner.NullFloat64 `spanner:"quantity"` WeightKg spanner.NullFloat64 `spanner:"weight_kg"` VolumeM3 spanner.NullFloat64 `spanner:"volume_m3"` }
func (*LineItemsRow) ColumnExprs ¶
func (*LineItemsRow) ColumnExprs() []spansql.Expr
func (*LineItemsRow) ColumnIDs ¶
func (*LineItemsRow) ColumnIDs() []spansql.ID
func (*LineItemsRow) ColumnNames ¶
func (*LineItemsRow) ColumnNames() []string
func (*LineItemsRow) Key ¶
func (r *LineItemsRow) Key() LineItemsKey
func (*LineItemsRow) Mutate ¶ added in v0.15.0
func (r *LineItemsRow) Mutate() (string, []string, []interface{})
func (*LineItemsRow) MutateColumns ¶ added in v0.15.0
func (r *LineItemsRow) MutateColumns(columns []string) (string, []string, []interface{})
func (*LineItemsRow) MutatePresentColumns ¶ added in v0.31.0
func (r *LineItemsRow) MutatePresentColumns() (string, []string, []interface{})
func (*LineItemsRow) UnmarshalSpannerRow ¶
func (r *LineItemsRow) UnmarshalSpannerRow(row *spanner.Row) error
func (*LineItemsRow) Validate ¶
func (r *LineItemsRow) Validate() error
type LineItemsRowIterator ¶
type LineItemsRowIterator interface { Next() (*LineItemsRow, error) Do(f func(row *LineItemsRow) error) error Stop() }
type LineItemsTableDescriptor ¶
type LineItemsTableDescriptor interface { TableName() string TableID() spansql.ID ColumnNames() []string ColumnIDs() []spansql.ID ColumnExprs() []spansql.Expr ShipperId() ColumnDescriptor ShipmentId() ColumnDescriptor LineNumber() ColumnDescriptor Title() ColumnDescriptor Quantity() ColumnDescriptor WeightKg() ColumnDescriptor VolumeM3() ColumnDescriptor }
type ListLineItemsRowsQuery ¶ added in v0.16.0
type ListShipmentsRowsQuery ¶ added in v0.16.0
type ListShippersRowsQuery ¶ added in v0.16.0
type ListSitesRowsQuery ¶ added in v0.16.0
type ReadTransaction ¶ added in v0.15.0
type ReadTransaction struct {
Tx SpannerReadTransaction
}
func Query ¶ added in v0.15.0
func Query(tx SpannerReadTransaction) ReadTransaction
func (ReadTransaction) BatchGetLineItemsRows ¶ added in v0.15.0
func (t ReadTransaction) BatchGetLineItemsRows( ctx context.Context, query BatchGetLineItemsRowsQuery, ) (map[LineItemsKey]*LineItemsRow, error)
func (ReadTransaction) BatchGetShipmentsRows ¶ added in v0.15.0
func (t ReadTransaction) BatchGetShipmentsRows( ctx context.Context, query BatchGetShipmentsRowsQuery, ) (map[ShipmentsKey]*ShipmentsRow, error)
func (ReadTransaction) BatchGetShippersRows ¶ added in v0.15.0
func (t ReadTransaction) BatchGetShippersRows( ctx context.Context, query BatchGetShippersRowsQuery, ) (map[ShippersKey]*ShippersRow, error)
func (ReadTransaction) BatchGetSitesRows ¶ added in v0.15.0
func (t ReadTransaction) BatchGetSitesRows( ctx context.Context, query BatchGetSitesRowsQuery, ) (map[SitesKey]*SitesRow, error)
func (ReadTransaction) GetLineItemsRow ¶ added in v0.15.0
func (t ReadTransaction) GetLineItemsRow( ctx context.Context, query GetLineItemsRowQuery, ) (*LineItemsRow, error)
func (ReadTransaction) GetShipmentsRow ¶ added in v0.15.0
func (t ReadTransaction) GetShipmentsRow( ctx context.Context, query GetShipmentsRowQuery, ) (*ShipmentsRow, error)
func (ReadTransaction) GetShippersRow ¶ added in v0.15.0
func (t ReadTransaction) GetShippersRow( ctx context.Context, query GetShippersRowQuery, ) (*ShippersRow, error)
func (ReadTransaction) GetSitesRow ¶ added in v0.15.0
func (t ReadTransaction) GetSitesRow( ctx context.Context, query GetSitesRowQuery, ) (*SitesRow, error)
func (ReadTransaction) ListLineItemsRows ¶ added in v0.15.0
func (t ReadTransaction) ListLineItemsRows( ctx context.Context, query ListLineItemsRowsQuery, ) LineItemsRowIterator
func (ReadTransaction) ListShipmentsRows ¶ added in v0.15.0
func (t ReadTransaction) ListShipmentsRows( ctx context.Context, query ListShipmentsRowsQuery, ) ShipmentsRowIterator
func (ReadTransaction) ListShippersRows ¶ added in v0.15.0
func (t ReadTransaction) ListShippersRows( ctx context.Context, query ListShippersRowsQuery, ) ShippersRowIterator
func (ReadTransaction) ListSitesRows ¶ added in v0.15.0
func (t ReadTransaction) ListSitesRows( ctx context.Context, query ListSitesRowsQuery, ) SitesRowIterator
func (ReadTransaction) ReadLineItemsRows ¶ added in v0.15.0
func (t ReadTransaction) ReadLineItemsRows( ctx context.Context, keySet spanner.KeySet, ) LineItemsRowIterator
func (ReadTransaction) ReadShipmentsRows ¶ added in v0.15.0
func (t ReadTransaction) ReadShipmentsRows( ctx context.Context, keySet spanner.KeySet, ) ShipmentsRowIterator
func (ReadTransaction) ReadShippersRows ¶ added in v0.15.0
func (t ReadTransaction) ReadShippersRows( ctx context.Context, keySet spanner.KeySet, ) ShippersRowIterator
func (ReadTransaction) ReadSitesRows ¶ added in v0.15.0
func (t ReadTransaction) ReadSitesRows( ctx context.Context, keySet spanner.KeySet, ) SitesRowIterator
type ShipmentsKey ¶
func (ShipmentsKey) BoolExpr ¶
func (k ShipmentsKey) BoolExpr() spansql.BoolExpr
func (ShipmentsKey) Delete ¶
func (k ShipmentsKey) Delete() *spanner.Mutation
func (ShipmentsKey) Order ¶
func (ShipmentsKey) Order() []spansql.Order
func (ShipmentsKey) SpannerKey ¶
func (k ShipmentsKey) SpannerKey() spanner.Key
func (ShipmentsKey) SpannerKeySet ¶
func (k ShipmentsKey) SpannerKeySet() spanner.KeySet
type ShipmentsRow ¶
type ShipmentsRow struct { ShipperId string `spanner:"shipper_id"` ShipmentId string `spanner:"shipment_id"` CreateTime time.Time `spanner:"create_time"` UpdateTime time.Time `spanner:"update_time"` DeleteTime spanner.NullTime `spanner:"delete_time"` OriginSiteId spanner.NullString `spanner:"origin_site_id"` DestinationSiteId spanner.NullString `spanner:"destination_site_id"` PickupEarliestTime spanner.NullTime `spanner:"pickup_earliest_time"` PickupLatestTime spanner.NullTime `spanner:"pickup_latest_time"` DeliveryEarliestTime spanner.NullTime `spanner:"delivery_earliest_time"` DeliveryLatestTime spanner.NullTime `spanner:"delivery_latest_time"` LineItems []*LineItemsRow `spanner:"line_items"` }
func (*ShipmentsRow) ColumnExprs ¶
func (*ShipmentsRow) ColumnExprs() []spansql.Expr
func (*ShipmentsRow) ColumnIDs ¶
func (*ShipmentsRow) ColumnIDs() []spansql.ID
func (*ShipmentsRow) ColumnNames ¶
func (*ShipmentsRow) ColumnNames() []string
func (*ShipmentsRow) Key ¶
func (r *ShipmentsRow) Key() ShipmentsKey
func (*ShipmentsRow) Mutate ¶ added in v0.15.0
func (r *ShipmentsRow) Mutate() (string, []string, []interface{})
func (*ShipmentsRow) MutateColumns ¶ added in v0.15.0
func (r *ShipmentsRow) MutateColumns(columns []string) (string, []string, []interface{})
func (*ShipmentsRow) MutatePresentColumns ¶ added in v0.31.0
func (r *ShipmentsRow) MutatePresentColumns() (string, []string, []interface{})
func (*ShipmentsRow) UnmarshalSpannerRow ¶
func (r *ShipmentsRow) UnmarshalSpannerRow(row *spanner.Row) error
func (*ShipmentsRow) Validate ¶
func (r *ShipmentsRow) Validate() error
type ShipmentsRowIterator ¶
type ShipmentsRowIterator interface { Next() (*ShipmentsRow, error) Do(f func(row *ShipmentsRow) error) error Stop() }
type ShipmentsTableDescriptor ¶
type ShipmentsTableDescriptor interface { TableName() string TableID() spansql.ID ColumnNames() []string ColumnIDs() []spansql.ID ColumnExprs() []spansql.Expr ShipperId() ColumnDescriptor ShipmentId() ColumnDescriptor CreateTime() ColumnDescriptor UpdateTime() ColumnDescriptor DeleteTime() ColumnDescriptor OriginSiteId() ColumnDescriptor DestinationSiteId() ColumnDescriptor PickupEarliestTime() ColumnDescriptor PickupLatestTime() ColumnDescriptor DeliveryEarliestTime() ColumnDescriptor DeliveryLatestTime() ColumnDescriptor }
type ShippersKey ¶
type ShippersKey struct {
ShipperId string
}
func (ShippersKey) BoolExpr ¶
func (k ShippersKey) BoolExpr() spansql.BoolExpr
func (ShippersKey) Delete ¶
func (k ShippersKey) Delete() *spanner.Mutation
func (ShippersKey) Order ¶
func (ShippersKey) Order() []spansql.Order
func (ShippersKey) SpannerKey ¶
func (k ShippersKey) SpannerKey() spanner.Key
func (ShippersKey) SpannerKeySet ¶
func (k ShippersKey) SpannerKeySet() spanner.KeySet
type ShippersRow ¶
type ShippersRow struct { ShipperId string `spanner:"shipper_id"` CreateTime time.Time `spanner:"create_time"` UpdateTime time.Time `spanner:"update_time"` DeleteTime spanner.NullTime `spanner:"delete_time"` Shipments []*ShipmentsRow `spanner:"shipments"` }
func (*ShippersRow) ColumnExprs ¶
func (*ShippersRow) ColumnExprs() []spansql.Expr
func (*ShippersRow) ColumnIDs ¶
func (*ShippersRow) ColumnIDs() []spansql.ID
func (*ShippersRow) ColumnNames ¶
func (*ShippersRow) ColumnNames() []string
func (*ShippersRow) Key ¶
func (r *ShippersRow) Key() ShippersKey
func (*ShippersRow) Mutate ¶ added in v0.15.0
func (r *ShippersRow) Mutate() (string, []string, []interface{})
func (*ShippersRow) MutateColumns ¶ added in v0.15.0
func (r *ShippersRow) MutateColumns(columns []string) (string, []string, []interface{})
func (*ShippersRow) MutatePresentColumns ¶ added in v0.31.0
func (r *ShippersRow) MutatePresentColumns() (string, []string, []interface{})
func (*ShippersRow) UnmarshalSpannerRow ¶
func (r *ShippersRow) UnmarshalSpannerRow(row *spanner.Row) error
func (*ShippersRow) Validate ¶
func (r *ShippersRow) Validate() error
type ShippersRowIterator ¶
type ShippersRowIterator interface { Next() (*ShippersRow, error) Do(f func(row *ShippersRow) error) error Stop() }
type ShippersTableDescriptor ¶
type ShippersTableDescriptor interface { TableName() string TableID() spansql.ID ColumnNames() []string ColumnIDs() []spansql.ID ColumnExprs() []spansql.Expr ShipperId() ColumnDescriptor CreateTime() ColumnDescriptor UpdateTime() ColumnDescriptor DeleteTime() ColumnDescriptor }
type SitesRow ¶
type SitesRow struct { ShipperId string `spanner:"shipper_id"` SiteId string `spanner:"site_id"` CreateTime time.Time `spanner:"create_time"` UpdateTime time.Time `spanner:"update_time"` DeleteTime spanner.NullTime `spanner:"delete_time"` DisplayName spanner.NullString `spanner:"display_name"` Latitude spanner.NullFloat64 `spanner:"latitude"` Longitude spanner.NullFloat64 `spanner:"longitude"` Config spanner.NullJSON `spanner:"config"` }
func (*SitesRow) ColumnExprs ¶
func (*SitesRow) ColumnNames ¶
func (*SitesRow) MutateColumns ¶ added in v0.15.0
func (*SitesRow) MutatePresentColumns ¶ added in v0.31.0
func (*SitesRow) UnmarshalSpannerRow ¶
type SitesRowIterator ¶
type SitesTableDescriptor ¶
type SitesTableDescriptor interface { TableName() string TableID() spansql.ID ColumnNames() []string ColumnIDs() []spansql.ID ColumnExprs() []spansql.Expr ShipperId() ColumnDescriptor SiteId() ColumnDescriptor CreateTime() ColumnDescriptor UpdateTime() ColumnDescriptor DeleteTime() ColumnDescriptor DisplayName() ColumnDescriptor Latitude() ColumnDescriptor Longitude() ColumnDescriptor Config() ColumnDescriptor }
type SpannerReadTransaction ¶
type SpannerReadTransaction interface { Read(ctx context.Context, table string, keys spanner.KeySet, columns []string) *spanner.RowIterator ReadRow(ctx context.Context, table string, key spanner.Key, columns []string) (*spanner.Row, error) Query(ctx context.Context, statement spanner.Statement) *spanner.RowIterator }
Click to show internal directories.
Click to hide internal directories.