freightdb

package
v0.59.0 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

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 ColumnDescriptor interface {
	ColumnID() spansql.ID
	ColumnName() string
	ColumnType() spansql.Type
	NotNull() bool
	AllowCommitTimestamp() bool
}

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

type LineItemsKey struct {
	ShipperId  string
	ShipmentId string
	LineNumber int64
}

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 ListLineItemsRowsQuery struct {
	Where  spansql.BoolExpr
	Order  []spansql.Order
	Limit  int32
	Offset int64
	Params map[string]interface{}
}

type ListShipmentsRowsQuery added in v0.16.0

type ListShipmentsRowsQuery struct {
	Where       spansql.BoolExpr
	Order       []spansql.Order
	Limit       int32
	Offset      int64
	Params      map[string]interface{}
	ShowDeleted bool
	LineItems   bool
}

type ListShippersRowsQuery added in v0.16.0

type ListShippersRowsQuery struct {
	Where       spansql.BoolExpr
	Order       []spansql.Order
	Limit       int32
	Offset      int64
	Params      map[string]interface{}
	ShowDeleted bool
	Shipments   bool
	LineItems   bool
}

type ListSitesRowsQuery added in v0.16.0

type ListSitesRowsQuery struct {
	Where       spansql.BoolExpr
	Order       []spansql.Order
	Limit       int32
	Offset      int64
	Params      map[string]interface{}
	ShowDeleted bool
}

type ReadTransaction added in v0.15.0

type ReadTransaction struct {
	Tx SpannerReadTransaction
}

func Query added in v0.15.0

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

type ShipmentsKey struct {
	ShipperId  string
	ShipmentId string
}

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 SitesKey

type SitesKey struct {
	ShipperId string
	SiteId    string
}

func (SitesKey) BoolExpr

func (k SitesKey) BoolExpr() spansql.BoolExpr

func (SitesKey) Delete

func (k SitesKey) Delete() *spanner.Mutation

func (SitesKey) Order

func (SitesKey) Order() []spansql.Order

func (SitesKey) SpannerKey

func (k SitesKey) SpannerKey() spanner.Key

func (SitesKey) SpannerKeySet

func (k SitesKey) SpannerKeySet() spanner.KeySet

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) ColumnExprs() []spansql.Expr

func (*SitesRow) ColumnIDs

func (*SitesRow) ColumnIDs() []spansql.ID

func (*SitesRow) ColumnNames

func (*SitesRow) ColumnNames() []string

func (*SitesRow) Key

func (r *SitesRow) Key() SitesKey

func (*SitesRow) Mutate added in v0.15.0

func (r *SitesRow) Mutate() (string, []string, []interface{})

func (*SitesRow) MutateColumns added in v0.15.0

func (r *SitesRow) MutateColumns(columns []string) (string, []string, []interface{})

func (*SitesRow) MutatePresentColumns added in v0.31.0

func (r *SitesRow) MutatePresentColumns() (string, []string, []interface{})

func (*SitesRow) UnmarshalSpannerRow

func (r *SitesRow) UnmarshalSpannerRow(row *spanner.Row) error

func (*SitesRow) Validate

func (r *SitesRow) Validate() error

type SitesRowIterator

type SitesRowIterator interface {
	Next() (*SitesRow, error)
	Do(f func(row *SitesRow) error) error
	Stop()
}

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
	ReadUsingIndex(ctx context.Context, table, index string, keys spanner.KeySet, columns []string) *spanner.RowIterator
	ReadRow(ctx context.Context, table string, key spanner.Key, columns []string) (*spanner.Row, error)
	ReadRowUsingIndex(ctx context.Context, table string, index string, key spanner.Key, columns []string) (*spanner.Row, error)
	Query(ctx context.Context, statement spanner.Statement) *spanner.RowIterator
}

Jump to

Keyboard shortcuts

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