models

package
v2.0.0-...-341ff40 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package models contains the types.

Package models contains the types.

Package models contains the types.

Package models contains the types.

Package models contains the types.

Package models contains the types.

Package models contains the types.

Package models contains the types.

Package models contains the types.

Package models contains the types.

Package models contains the types.

Package models contains the types.

Index

Constants

This section is empty.

Variables

View Source
var YOLog = func(context.Context, string, ...interface{}) {}

YOLog provides the log func used by generated queries.

Functions

func CompositePrimaryKeyColumns

func CompositePrimaryKeyColumns() []string

func CompositePrimaryKeyPrimaryKeys

func CompositePrimaryKeyPrimaryKeys() []string

func CompositePrimaryKeyWritableColumns

func CompositePrimaryKeyWritableColumns() []string

func CustomCompositePrimaryKeyColumns

func CustomCompositePrimaryKeyColumns() []string

func CustomCompositePrimaryKeyPrimaryKeys

func CustomCompositePrimaryKeyPrimaryKeys() []string

func CustomCompositePrimaryKeyWritableColumns

func CustomCompositePrimaryKeyWritableColumns() []string

func CustomPrimitiveTypeColumns

func CustomPrimitiveTypeColumns() []string

func CustomPrimitiveTypePrimaryKeys

func CustomPrimitiveTypePrimaryKeys() []string

func CustomPrimitiveTypeWritableColumns

func CustomPrimitiveTypeWritableColumns() []string

func FereignItemColumns

func FereignItemColumns() []string

func FereignItemPrimaryKeys

func FereignItemPrimaryKeys() []string

func FereignItemWritableColumns

func FereignItemWritableColumns() []string

func FullTypeColumns

func FullTypeColumns() []string

func FullTypePrimaryKeys

func FullTypePrimaryKeys() []string

func FullTypeWritableColumns

func FullTypeWritableColumns() []string

func GeneratedColumnColumns

func GeneratedColumnColumns() []string

func GeneratedColumnPrimaryKeys

func GeneratedColumnPrimaryKeys() []string

func GeneratedColumnWritableColumns

func GeneratedColumnWritableColumns() []string

func InflectionColumns

func InflectionColumns() []string

func InflectionPrimaryKeys

func InflectionPrimaryKeys() []string

func InflectionWritableColumns

func InflectionWritableColumns() []string

func ItemColumns

func ItemColumns() []string

func ItemPrimaryKeys

func ItemPrimaryKeys() []string

func ItemWritableColumns

func ItemWritableColumns() []string

func MaxLengthColumns

func MaxLengthColumns() []string

func MaxLengthPrimaryKeys

func MaxLengthPrimaryKeys() []string

func MaxLengthWritableColumns

func MaxLengthWritableColumns() []string

func OutOfOrderPrimaryKeyColumns

func OutOfOrderPrimaryKeyColumns() []string

func OutOfOrderPrimaryKeyPrimaryKeys

func OutOfOrderPrimaryKeyPrimaryKeys() []string

func OutOfOrderPrimaryKeyWritableColumns

func OutOfOrderPrimaryKeyWritableColumns() []string

func SnakeCaseColumns

func SnakeCaseColumns() []string

func SnakeCasePrimaryKeys

func SnakeCasePrimaryKeys() []string

func SnakeCaseWritableColumns

func SnakeCaseWritableColumns() []string

Types

type CompositePrimaryKey

type CompositePrimaryKey struct {
	ID    int64  `spanner:"Id" json:"Id"`       // Id
	PKey1 string `spanner:"PKey1" json:"PKey1"` // PKey1
	PKey2 int64  `spanner:"PKey2" json:"PKey2"` // PKey2
	Error int64  `spanner:"Error" json:"Error"` // Error
	X     string `spanner:"X" json:"X"`         // X
	Y     string `spanner:"Y" json:"Y"`         // Y
	Z     string `spanner:"Z" json:"Z"`         // Z
}

CompositePrimaryKey represents a row from 'CompositePrimaryKeys'.

func FindCompositePrimaryKey

func FindCompositePrimaryKey(ctx context.Context, db YODB, pKey1 string, pKey2 int64) (*CompositePrimaryKey, error)

FindCompositePrimaryKey gets a CompositePrimaryKey by primary key

func FindCompositePrimaryKeysByCompositePrimaryKeysByError

func FindCompositePrimaryKeysByCompositePrimaryKeysByError(ctx context.Context, db YODB, e int64) ([]*CompositePrimaryKey, error)

FindCompositePrimaryKeysByCompositePrimaryKeysByError retrieves multiple rows from 'CompositePrimaryKeys' as a slice of CompositePrimaryKey.

Generated from index 'CompositePrimaryKeysByError'.

func FindCompositePrimaryKeysByCompositePrimaryKeysByError2

func FindCompositePrimaryKeysByCompositePrimaryKeysByError2(ctx context.Context, db YODB, e int64) ([]*CompositePrimaryKey, error)

FindCompositePrimaryKeysByCompositePrimaryKeysByError2 retrieves multiple rows from 'CompositePrimaryKeys' as a slice of CompositePrimaryKey.

Generated from index 'CompositePrimaryKeysByError2'.

func FindCompositePrimaryKeysByCompositePrimaryKeysByError3

func FindCompositePrimaryKeysByCompositePrimaryKeysByError3(ctx context.Context, db YODB, e int64) ([]*CompositePrimaryKey, error)

FindCompositePrimaryKeysByCompositePrimaryKeysByError3 retrieves multiple rows from 'CompositePrimaryKeys' as a slice of CompositePrimaryKey.

Generated from index 'CompositePrimaryKeysByError3'.

func FindCompositePrimaryKeysByCompositePrimaryKeysByXY

func FindCompositePrimaryKeysByCompositePrimaryKeysByXY(ctx context.Context, db YODB, x string, y string) ([]*CompositePrimaryKey, error)

FindCompositePrimaryKeysByCompositePrimaryKeysByXY retrieves multiple rows from 'CompositePrimaryKeys' as a slice of CompositePrimaryKey.

Generated from index 'CompositePrimaryKeysByXY'.

func ReadCompositePrimaryKey

func ReadCompositePrimaryKey(ctx context.Context, db YODB, keys spanner.KeySet) ([]*CompositePrimaryKey, error)

ReadCompositePrimaryKey retrieves multiples rows from CompositePrimaryKey by KeySet as a slice.

func ReadCompositePrimaryKeysByCompositePrimaryKeysByError

func ReadCompositePrimaryKeysByCompositePrimaryKeysByError(ctx context.Context, db YODB, keys spanner.KeySet) ([]*CompositePrimaryKey, error)

ReadCompositePrimaryKeysByCompositePrimaryKeysByError retrieves multiples rows from 'CompositePrimaryKeys' by KeySet as a slice.

This does not retrieve all columns of 'CompositePrimaryKeys' because an index has only columns used for primary key, index key and storing columns. If you need more columns, add storing columns or Read by primary key or Query with join.

Generated from index 'CompositePrimaryKeysByError'.

func ReadCompositePrimaryKeysByCompositePrimaryKeysByError2

func ReadCompositePrimaryKeysByCompositePrimaryKeysByError2(ctx context.Context, db YODB, keys spanner.KeySet) ([]*CompositePrimaryKey, error)

ReadCompositePrimaryKeysByCompositePrimaryKeysByError2 retrieves multiples rows from 'CompositePrimaryKeys' by KeySet as a slice.

This does not retrieve all columns of 'CompositePrimaryKeys' because an index has only columns used for primary key, index key and storing columns. If you need more columns, add storing columns or Read by primary key or Query with join.

Generated from index 'CompositePrimaryKeysByError2'.

func ReadCompositePrimaryKeysByCompositePrimaryKeysByError3

func ReadCompositePrimaryKeysByCompositePrimaryKeysByError3(ctx context.Context, db YODB, keys spanner.KeySet) ([]*CompositePrimaryKey, error)

ReadCompositePrimaryKeysByCompositePrimaryKeysByError3 retrieves multiples rows from 'CompositePrimaryKeys' by KeySet as a slice.

This does not retrieve all columns of 'CompositePrimaryKeys' because an index has only columns used for primary key, index key and storing columns. If you need more columns, add storing columns or Read by primary key or Query with join.

Generated from index 'CompositePrimaryKeysByError3'.

func ReadCompositePrimaryKeysByCompositePrimaryKeysByXY

func ReadCompositePrimaryKeysByCompositePrimaryKeysByXY(ctx context.Context, db YODB, keys spanner.KeySet) ([]*CompositePrimaryKey, error)

ReadCompositePrimaryKeysByCompositePrimaryKeysByXY retrieves multiples rows from 'CompositePrimaryKeys' by KeySet as a slice.

This does not retrieve all columns of 'CompositePrimaryKeys' because an index has only columns used for primary key, index key and storing columns. If you need more columns, add storing columns or Read by primary key or Query with join.

Generated from index 'CompositePrimaryKeysByXY'.

func (*CompositePrimaryKey) Delete

Delete deletes the CompositePrimaryKey from the database.

func (*CompositePrimaryKey) Insert

Insert returns a Mutation to insert a row into a table. If the row already exists, the write or transaction fails.

func (*CompositePrimaryKey) InsertOrUpdate

func (cpk *CompositePrimaryKey) InsertOrUpdate(ctx context.Context) *spanner.Mutation

InsertOrUpdate returns a Mutation to insert a row into a table. If the row already exists, it updates it instead. Any column values not explicitly written are preserved.

func (*CompositePrimaryKey) Replace

func (cpk *CompositePrimaryKey) Replace(ctx context.Context) *spanner.Mutation

Replace returns a Mutation to insert a row into a table, deleting any existing row. Unlike InsertOrUpdate, this means any values not explicitly written become NULL.

func (*CompositePrimaryKey) Update

Update returns a Mutation to update a row in a table. If the row does not already exist, the write or transaction fails.

func (*CompositePrimaryKey) UpdateColumns

func (cpk *CompositePrimaryKey) UpdateColumns(ctx context.Context, cols ...string) (*spanner.Mutation, error)

UpdateColumns returns a Mutation to update specified columns of a row in a table.

type CustomCompositePrimaryKey

type CustomCompositePrimaryKey struct {
	ID    uint64 `spanner:"Id" json:"Id"`       // Id
	PKey1 string `spanner:"PKey1" json:"PKey1"` // PKey1
	PKey2 uint32 `spanner:"PKey2" json:"PKey2"` // PKey2
	Error int8   `spanner:"Error" json:"Error"` // Error
	X     string `spanner:"X" json:"X"`         // X
	Y     string `spanner:"Y" json:"Y"`         // Y
	Z     string `spanner:"Z" json:"Z"`         // Z
}

CustomCompositePrimaryKey represents a row from 'CustomCompositePrimaryKeys'.

func FindCustomCompositePrimaryKey

func FindCustomCompositePrimaryKey(ctx context.Context, db YODB, pKey1 string, pKey2 uint32) (*CustomCompositePrimaryKey, error)

FindCustomCompositePrimaryKey gets a CustomCompositePrimaryKey by primary key

func FindCustomCompositePrimaryKeysByCustomCompositePrimaryKeysByError

func FindCustomCompositePrimaryKeysByCustomCompositePrimaryKeysByError(ctx context.Context, db YODB, e int8) ([]*CustomCompositePrimaryKey, error)

FindCustomCompositePrimaryKeysByCustomCompositePrimaryKeysByError retrieves multiple rows from 'CustomCompositePrimaryKeys' as a slice of CustomCompositePrimaryKey.

Generated from index 'CustomCompositePrimaryKeysByError'.

func FindCustomCompositePrimaryKeysByCustomCompositePrimaryKeysByError2

func FindCustomCompositePrimaryKeysByCustomCompositePrimaryKeysByError2(ctx context.Context, db YODB, e int8) ([]*CustomCompositePrimaryKey, error)

FindCustomCompositePrimaryKeysByCustomCompositePrimaryKeysByError2 retrieves multiple rows from 'CustomCompositePrimaryKeys' as a slice of CustomCompositePrimaryKey.

Generated from index 'CustomCompositePrimaryKeysByError2'.

func FindCustomCompositePrimaryKeysByCustomCompositePrimaryKeysByError3

func FindCustomCompositePrimaryKeysByCustomCompositePrimaryKeysByError3(ctx context.Context, db YODB, e int8) ([]*CustomCompositePrimaryKey, error)

FindCustomCompositePrimaryKeysByCustomCompositePrimaryKeysByError3 retrieves multiple rows from 'CustomCompositePrimaryKeys' as a slice of CustomCompositePrimaryKey.

Generated from index 'CustomCompositePrimaryKeysByError3'.

func FindCustomCompositePrimaryKeysByCustomCompositePrimaryKeysByXY

func FindCustomCompositePrimaryKeysByCustomCompositePrimaryKeysByXY(ctx context.Context, db YODB, x string, y string) ([]*CustomCompositePrimaryKey, error)

FindCustomCompositePrimaryKeysByCustomCompositePrimaryKeysByXY retrieves multiple rows from 'CustomCompositePrimaryKeys' as a slice of CustomCompositePrimaryKey.

Generated from index 'CustomCompositePrimaryKeysByXY'.

func ReadCustomCompositePrimaryKey

func ReadCustomCompositePrimaryKey(ctx context.Context, db YODB, keys spanner.KeySet) ([]*CustomCompositePrimaryKey, error)

ReadCustomCompositePrimaryKey retrieves multiples rows from CustomCompositePrimaryKey by KeySet as a slice.

func ReadCustomCompositePrimaryKeysByCustomCompositePrimaryKeysByError

func ReadCustomCompositePrimaryKeysByCustomCompositePrimaryKeysByError(ctx context.Context, db YODB, keys spanner.KeySet) ([]*CustomCompositePrimaryKey, error)

ReadCustomCompositePrimaryKeysByCustomCompositePrimaryKeysByError retrieves multiples rows from 'CustomCompositePrimaryKeys' by KeySet as a slice.

This does not retrieve all columns of 'CustomCompositePrimaryKeys' because an index has only columns used for primary key, index key and storing columns. If you need more columns, add storing columns or Read by primary key or Query with join.

Generated from index 'CustomCompositePrimaryKeysByError'.

func ReadCustomCompositePrimaryKeysByCustomCompositePrimaryKeysByError2

func ReadCustomCompositePrimaryKeysByCustomCompositePrimaryKeysByError2(ctx context.Context, db YODB, keys spanner.KeySet) ([]*CustomCompositePrimaryKey, error)

ReadCustomCompositePrimaryKeysByCustomCompositePrimaryKeysByError2 retrieves multiples rows from 'CustomCompositePrimaryKeys' by KeySet as a slice.

This does not retrieve all columns of 'CustomCompositePrimaryKeys' because an index has only columns used for primary key, index key and storing columns. If you need more columns, add storing columns or Read by primary key or Query with join.

Generated from index 'CustomCompositePrimaryKeysByError2'.

func ReadCustomCompositePrimaryKeysByCustomCompositePrimaryKeysByError3

func ReadCustomCompositePrimaryKeysByCustomCompositePrimaryKeysByError3(ctx context.Context, db YODB, keys spanner.KeySet) ([]*CustomCompositePrimaryKey, error)

ReadCustomCompositePrimaryKeysByCustomCompositePrimaryKeysByError3 retrieves multiples rows from 'CustomCompositePrimaryKeys' by KeySet as a slice.

This does not retrieve all columns of 'CustomCompositePrimaryKeys' because an index has only columns used for primary key, index key and storing columns. If you need more columns, add storing columns or Read by primary key or Query with join.

Generated from index 'CustomCompositePrimaryKeysByError3'.

func ReadCustomCompositePrimaryKeysByCustomCompositePrimaryKeysByXY

func ReadCustomCompositePrimaryKeysByCustomCompositePrimaryKeysByXY(ctx context.Context, db YODB, keys spanner.KeySet) ([]*CustomCompositePrimaryKey, error)

ReadCustomCompositePrimaryKeysByCustomCompositePrimaryKeysByXY retrieves multiples rows from 'CustomCompositePrimaryKeys' by KeySet as a slice.

This does not retrieve all columns of 'CustomCompositePrimaryKeys' because an index has only columns used for primary key, index key and storing columns. If you need more columns, add storing columns or Read by primary key or Query with join.

Generated from index 'CustomCompositePrimaryKeysByXY'.

func (*CustomCompositePrimaryKey) Delete

Delete deletes the CustomCompositePrimaryKey from the database.

func (*CustomCompositePrimaryKey) Insert

Insert returns a Mutation to insert a row into a table. If the row already exists, the write or transaction fails.

func (*CustomCompositePrimaryKey) InsertOrUpdate

func (ccpk *CustomCompositePrimaryKey) InsertOrUpdate(ctx context.Context) *spanner.Mutation

InsertOrUpdate returns a Mutation to insert a row into a table. If the row already exists, it updates it instead. Any column values not explicitly written are preserved.

func (*CustomCompositePrimaryKey) Replace

Replace returns a Mutation to insert a row into a table, deleting any existing row. Unlike InsertOrUpdate, this means any values not explicitly written become NULL.

func (*CustomCompositePrimaryKey) Update

Update returns a Mutation to update a row in a table. If the row does not already exist, the write or transaction fails.

func (*CustomCompositePrimaryKey) UpdateColumns

func (ccpk *CustomCompositePrimaryKey) UpdateColumns(ctx context.Context, cols ...string) (*spanner.Mutation, error)

UpdateColumns returns a Mutation to update specified columns of a row in a table.

type CustomPrimitiveType

type CustomPrimitiveType struct {
	PKey              string  `spanner:"PKey" json:"PKey"`                           // PKey
	FTInt64           int64   `spanner:"FTInt64" json:"FTInt64"`                     // FTInt64
	FTInt64null       int64   `spanner:"FTInt64Null" json:"FTInt64Null"`             // FTInt64Null
	FTInt32           int32   `spanner:"FTInt32" json:"FTInt32"`                     // FTInt32
	FTInt32null       int32   `spanner:"FTInt32Null" json:"FTInt32Null"`             // FTInt32Null
	FTInt16           int16   `spanner:"FTInt16" json:"FTInt16"`                     // FTInt16
	FTInt16null       int16   `spanner:"FTInt16Null" json:"FTInt16Null"`             // FTInt16Null
	FTInt8            int8    `spanner:"FTInt8" json:"FTInt8"`                       // FTInt8
	FTInt8null        int8    `spanner:"FTInt8Null" json:"FTInt8Null"`               // FTInt8Null
	FTUInt64          uint64  `spanner:"FTUInt64" json:"FTUInt64"`                   // FTUInt64
	FTUInt64null      uint64  `spanner:"FTUInt64Null" json:"FTUInt64Null"`           // FTUInt64Null
	FTUInt32          uint32  `spanner:"FTUInt32" json:"FTUInt32"`                   // FTUInt32
	FTUInt32null      uint32  `spanner:"FTUInt32Null" json:"FTUInt32Null"`           // FTUInt32Null
	FTUInt16          uint16  `spanner:"FTUInt16" json:"FTUInt16"`                   // FTUInt16
	FTUInt16null      uint16  `spanner:"FTUInt16Null" json:"FTUInt16Null"`           // FTUInt16Null
	FTUInt8           uint8   `spanner:"FTUInt8" json:"FTUInt8"`                     // FTUInt8
	FTUInt8null       uint8   `spanner:"FTUInt8Null" json:"FTUInt8Null"`             // FTUInt8Null
	FTArrayInt64      []int64 `spanner:"FTArrayInt64" json:"FTArrayInt64"`           // FTArrayInt64
	FTArrayInt64null  []int64 `spanner:"FTArrayInt64Null" json:"FTArrayInt64Null"`   // FTArrayInt64Null
	FTArrayInt32      []int64 `spanner:"FTArrayInt32" json:"FTArrayInt32"`           // FTArrayInt32
	FTArrayInt32null  []int64 `spanner:"FTArrayInt32Null" json:"FTArrayInt32Null"`   // FTArrayInt32Null
	FTArrayInt16      []int64 `spanner:"FTArrayInt16" json:"FTArrayInt16"`           // FTArrayInt16
	FTArrayInt16null  []int64 `spanner:"FTArrayInt16Null" json:"FTArrayInt16Null"`   // FTArrayInt16Null
	FTArrayInt8       []int64 `spanner:"FTArrayInt8" json:"FTArrayInt8"`             // FTArrayInt8
	FTArrayInt8null   []int64 `spanner:"FTArrayInt8Null" json:"FTArrayInt8Null"`     // FTArrayInt8Null
	FTArrayUINt64     []int64 `spanner:"FTArrayUInt64" json:"FTArrayUInt64"`         // FTArrayUInt64
	FTArrayUINt64null []int64 `spanner:"FTArrayUInt64Null" json:"FTArrayUInt64Null"` // FTArrayUInt64Null
	FTArrayUINt32     []int64 `spanner:"FTArrayUInt32" json:"FTArrayUInt32"`         // FTArrayUInt32
	FTArrayUINt32null []int64 `spanner:"FTArrayUInt32Null" json:"FTArrayUInt32Null"` // FTArrayUInt32Null
	FTArrayUINt16     []int64 `spanner:"FTArrayUInt16" json:"FTArrayUInt16"`         // FTArrayUInt16
	FTArrayUINt16null []int64 `spanner:"FTArrayUInt16Null" json:"FTArrayUInt16Null"` // FTArrayUInt16Null
	FTArrayUINt8      []int64 `spanner:"FTArrayUInt8" json:"FTArrayUInt8"`           // FTArrayUInt8
	FTArrayUINt8null  []int64 `spanner:"FTArrayUInt8Null" json:"FTArrayUInt8Null"`   // FTArrayUInt8Null
}

CustomPrimitiveType represents a row from 'CustomPrimitiveTypes'.

func FindCustomPrimitiveType

func FindCustomPrimitiveType(ctx context.Context, db YODB, pKey string) (*CustomPrimitiveType, error)

FindCustomPrimitiveType gets a CustomPrimitiveType by primary key

func ReadCustomPrimitiveType

func ReadCustomPrimitiveType(ctx context.Context, db YODB, keys spanner.KeySet) ([]*CustomPrimitiveType, error)

ReadCustomPrimitiveType retrieves multiples rows from CustomPrimitiveType by KeySet as a slice.

func (*CustomPrimitiveType) Delete

Delete deletes the CustomPrimitiveType from the database.

func (*CustomPrimitiveType) Insert

Insert returns a Mutation to insert a row into a table. If the row already exists, the write or transaction fails.

func (*CustomPrimitiveType) InsertOrUpdate

func (cpt *CustomPrimitiveType) InsertOrUpdate(ctx context.Context) *spanner.Mutation

InsertOrUpdate returns a Mutation to insert a row into a table. If the row already exists, it updates it instead. Any column values not explicitly written are preserved.

func (*CustomPrimitiveType) Replace

func (cpt *CustomPrimitiveType) Replace(ctx context.Context) *spanner.Mutation

Replace returns a Mutation to insert a row into a table, deleting any existing row. Unlike InsertOrUpdate, this means any values not explicitly written become NULL.

func (*CustomPrimitiveType) Update

Update returns a Mutation to update a row in a table. If the row does not already exist, the write or transaction fails.

func (*CustomPrimitiveType) UpdateColumns

func (cpt *CustomPrimitiveType) UpdateColumns(ctx context.Context, cols ...string) (*spanner.Mutation, error)

UpdateColumns returns a Mutation to update specified columns of a row in a table.

type FereignItem

type FereignItem struct {
	ID       int64 `spanner:"ID" json:"ID"`             // ID
	ItemID   int64 `spanner:"ItemID" json:"ItemID"`     // ItemID
	Category int64 `spanner:"Category" json:"Category"` // Category
}

FereignItem represents a row from 'FereignItems'.

func FindFereignItem

func FindFereignItem(ctx context.Context, db YODB, id int64) (*FereignItem, error)

FindFereignItem gets a FereignItem by primary key

func ReadFereignItem

func ReadFereignItem(ctx context.Context, db YODB, keys spanner.KeySet) ([]*FereignItem, error)

ReadFereignItem retrieves multiples rows from FereignItem by KeySet as a slice.

func (*FereignItem) Delete

func (fi *FereignItem) Delete(ctx context.Context) *spanner.Mutation

Delete deletes the FereignItem from the database.

func (*FereignItem) Insert

func (fi *FereignItem) Insert(ctx context.Context) *spanner.Mutation

Insert returns a Mutation to insert a row into a table. If the row already exists, the write or transaction fails.

func (*FereignItem) InsertOrUpdate

func (fi *FereignItem) InsertOrUpdate(ctx context.Context) *spanner.Mutation

InsertOrUpdate returns a Mutation to insert a row into a table. If the row already exists, it updates it instead. Any column values not explicitly written are preserved.

func (*FereignItem) Replace

func (fi *FereignItem) Replace(ctx context.Context) *spanner.Mutation

Replace returns a Mutation to insert a row into a table, deleting any existing row. Unlike InsertOrUpdate, this means any values not explicitly written become NULL.

func (*FereignItem) Update

func (fi *FereignItem) Update(ctx context.Context) *spanner.Mutation

Update returns a Mutation to update a row in a table. If the row does not already exist, the write or transaction fails.

func (*FereignItem) UpdateColumns

func (fi *FereignItem) UpdateColumns(ctx context.Context, cols ...string) (*spanner.Mutation, error)

UpdateColumns returns a Mutation to update specified columns of a row in a table.

type FullType

type FullType struct {
	PKey                 string              `spanner:"PKey" json:"PKey"`                                 // PKey
	FTString             string              `spanner:"FTString" json:"FTString"`                         // FTString
	FTStringNull         spanner.NullString  `spanner:"FTStringNull" json:"FTStringNull"`                 // FTStringNull
	FTBool               bool                `spanner:"FTBool" json:"FTBool"`                             // FTBool
	FTBoolNull           spanner.NullBool    `spanner:"FTBoolNull" json:"FTBoolNull"`                     // FTBoolNull
	FTBytes              []byte              `spanner:"FTBytes" json:"FTBytes"`                           // FTBytes
	FTBytesNull          []byte              `spanner:"FTBytesNull" json:"FTBytesNull"`                   // FTBytesNull
	FTTimestamp          time.Time           `spanner:"FTTimestamp" json:"FTTimestamp"`                   // FTTimestamp
	FTTimestampNull      spanner.NullTime    `spanner:"FTTimestampNull" json:"FTTimestampNull"`           // FTTimestampNull
	FTInt                int64               `spanner:"FTInt" json:"FTInt"`                               // FTInt
	FTIntNull            spanner.NullInt64   `spanner:"FTIntNull" json:"FTIntNull"`                       // FTIntNull
	FTFloat              float64             `spanner:"FTFloat" json:"FTFloat"`                           // FTFloat
	FTFloatNull          spanner.NullFloat64 `spanner:"FTFloatNull" json:"FTFloatNull"`                   // FTFloatNull
	FTDate               civil.Date          `spanner:"FTDate" json:"FTDate"`                             // FTDate
	FTDateNull           spanner.NullDate    `spanner:"FTDateNull" json:"FTDateNull"`                     // FTDateNull
	FTJSON               spanner.NullJSON    `spanner:"FTJson" json:"FTJson"`                             // FTJson
	FTJSONNull           spanner.NullJSON    `spanner:"FTJsonNull" json:"FTJsonNull"`                     // FTJsonNull
	FTArrayStringNull    []string            `spanner:"FTArrayStringNull" json:"FTArrayStringNull"`       // FTArrayStringNull
	FTArrayString        []string            `spanner:"FTArrayString" json:"FTArrayString"`               // FTArrayString
	FTArrayBoolNull      []bool              `spanner:"FTArrayBoolNull" json:"FTArrayBoolNull"`           // FTArrayBoolNull
	FTArrayBool          []bool              `spanner:"FTArrayBool" json:"FTArrayBool"`                   // FTArrayBool
	FTArrayBytesNull     [][]byte            `spanner:"FTArrayBytesNull" json:"FTArrayBytesNull"`         // FTArrayBytesNull
	FTArrayBytes         [][]byte            `spanner:"FTArrayBytes" json:"FTArrayBytes"`                 // FTArrayBytes
	FTArrayTimestampNull []time.Time         `spanner:"FTArrayTimestampNull" json:"FTArrayTimestampNull"` // FTArrayTimestampNull
	FTArrayTimestamp     []time.Time         `spanner:"FTArrayTimestamp" json:"FTArrayTimestamp"`         // FTArrayTimestamp
	FTArrayIntNull       []int64             `spanner:"FTArrayIntNull" json:"FTArrayIntNull"`             // FTArrayIntNull
	FTArrayInt           []int64             `spanner:"FTArrayInt" json:"FTArrayInt"`                     // FTArrayInt
	FTArrayFloatNull     []float64           `spanner:"FTArrayFloatNull" json:"FTArrayFloatNull"`         // FTArrayFloatNull
	FTArrayFloat         []float64           `spanner:"FTArrayFloat" json:"FTArrayFloat"`                 // FTArrayFloat
	FTArrayDateNull      []civil.Date        `spanner:"FTArrayDateNull" json:"FTArrayDateNull"`           // FTArrayDateNull
	FTArrayDate          []civil.Date        `spanner:"FTArrayDate" json:"FTArrayDate"`                   // FTArrayDate
	FTArrayJSONNull      []spanner.NullJSON  `spanner:"FTArrayJsonNull" json:"FTArrayJsonNull"`           // FTArrayJsonNull
	FTArrayJSON          []spanner.NullJSON  `spanner:"FTArrayJson" json:"FTArrayJson"`                   // FTArrayJson
}

FullType represents a row from 'FullTypes'.

func FindFullType

func FindFullType(ctx context.Context, db YODB, pKey string) (*FullType, error)

FindFullType gets a FullType by primary key

func FindFullTypeByFullTypesByFTString

func FindFullTypeByFullTypesByFTString(ctx context.Context, db YODB, fTString string) (*FullType, error)

FindFullTypeByFullTypesByFTString retrieves a row from 'FullTypes' as a FullType.

If no row is present with the given key, then ReadRow returns an error where spanner.ErrCode(err) is codes.NotFound.

Generated from unique index 'FullTypesByFTString'.

func FindFullTypesByFullTypesByInTimestampNull

func FindFullTypesByFullTypesByInTimestampNull(ctx context.Context, db YODB, fTInt int64, fTTimestampNull spanner.NullTime) ([]*FullType, error)

FindFullTypesByFullTypesByInTimestampNull retrieves multiple rows from 'FullTypes' as a slice of FullType.

Generated from index 'FullTypesByInTimestampNull'.

func FindFullTypesByFullTypesByIntDate

func FindFullTypesByFullTypesByIntDate(ctx context.Context, db YODB, fTInt int64, fTDate civil.Date) ([]*FullType, error)

FindFullTypesByFullTypesByIntDate retrieves multiple rows from 'FullTypes' as a slice of FullType.

Generated from index 'FullTypesByIntDate'.

func FindFullTypesByFullTypesByIntTimestamp

func FindFullTypesByFullTypesByIntTimestamp(ctx context.Context, db YODB, fTInt int64, fTTimestamp time.Time) ([]*FullType, error)

FindFullTypesByFullTypesByIntTimestamp retrieves multiple rows from 'FullTypes' as a slice of FullType.

Generated from index 'FullTypesByIntTimestamp'.

func FindFullTypesByFullTypesByTimestamp

func FindFullTypesByFullTypesByTimestamp(ctx context.Context, db YODB, fTTimestamp time.Time) ([]*FullType, error)

FindFullTypesByFullTypesByTimestamp retrieves multiple rows from 'FullTypes' as a slice of FullType.

Generated from index 'FullTypesByTimestamp'.

func ReadFullType

func ReadFullType(ctx context.Context, db YODB, keys spanner.KeySet) ([]*FullType, error)

ReadFullType retrieves multiples rows from FullType by KeySet as a slice.

func ReadFullTypeByFullTypesByFTString

func ReadFullTypeByFullTypesByFTString(ctx context.Context, db YODB, keys spanner.KeySet) ([]*FullType, error)

ReadFullTypeByFullTypesByFTString retrieves multiples rows from 'FullTypes' by KeySet as a slice.

This does not retrieve all columns of 'FullTypes' because an index has only columns used for primary key, index key and storing columns. If you need more columns, add storing columns or Read by primary key or Query with join.

Generated from index 'FullTypesByFTString'.

func ReadFullTypesByFullTypesByInTimestampNull

func ReadFullTypesByFullTypesByInTimestampNull(ctx context.Context, db YODB, keys spanner.KeySet) ([]*FullType, error)

ReadFullTypesByFullTypesByInTimestampNull retrieves multiples rows from 'FullTypes' by KeySet as a slice.

This does not retrieve all columns of 'FullTypes' because an index has only columns used for primary key, index key and storing columns. If you need more columns, add storing columns or Read by primary key or Query with join.

Generated from index 'FullTypesByInTimestampNull'.

func ReadFullTypesByFullTypesByIntDate

func ReadFullTypesByFullTypesByIntDate(ctx context.Context, db YODB, keys spanner.KeySet) ([]*FullType, error)

ReadFullTypesByFullTypesByIntDate retrieves multiples rows from 'FullTypes' by KeySet as a slice.

This does not retrieve all columns of 'FullTypes' because an index has only columns used for primary key, index key and storing columns. If you need more columns, add storing columns or Read by primary key or Query with join.

Generated from index 'FullTypesByIntDate'.

func ReadFullTypesByFullTypesByIntTimestamp

func ReadFullTypesByFullTypesByIntTimestamp(ctx context.Context, db YODB, keys spanner.KeySet) ([]*FullType, error)

ReadFullTypesByFullTypesByIntTimestamp retrieves multiples rows from 'FullTypes' by KeySet as a slice.

This does not retrieve all columns of 'FullTypes' because an index has only columns used for primary key, index key and storing columns. If you need more columns, add storing columns or Read by primary key or Query with join.

Generated from index 'FullTypesByIntTimestamp'.

func ReadFullTypesByFullTypesByTimestamp

func ReadFullTypesByFullTypesByTimestamp(ctx context.Context, db YODB, keys spanner.KeySet) ([]*FullType, error)

ReadFullTypesByFullTypesByTimestamp retrieves multiples rows from 'FullTypes' by KeySet as a slice.

This does not retrieve all columns of 'FullTypes' because an index has only columns used for primary key, index key and storing columns. If you need more columns, add storing columns or Read by primary key or Query with join.

Generated from index 'FullTypesByTimestamp'.

func (*FullType) Delete

func (ft *FullType) Delete(ctx context.Context) *spanner.Mutation

Delete deletes the FullType from the database.

func (*FullType) Insert

func (ft *FullType) Insert(ctx context.Context) *spanner.Mutation

Insert returns a Mutation to insert a row into a table. If the row already exists, the write or transaction fails.

func (*FullType) InsertOrUpdate

func (ft *FullType) InsertOrUpdate(ctx context.Context) *spanner.Mutation

InsertOrUpdate returns a Mutation to insert a row into a table. If the row already exists, it updates it instead. Any column values not explicitly written are preserved.

func (*FullType) Replace

func (ft *FullType) Replace(ctx context.Context) *spanner.Mutation

Replace returns a Mutation to insert a row into a table, deleting any existing row. Unlike InsertOrUpdate, this means any values not explicitly written become NULL.

func (*FullType) Update

func (ft *FullType) Update(ctx context.Context) *spanner.Mutation

Update returns a Mutation to update a row in a table. If the row does not already exist, the write or transaction fails.

func (*FullType) UpdateColumns

func (ft *FullType) UpdateColumns(ctx context.Context, cols ...string) (*spanner.Mutation, error)

UpdateColumns returns a Mutation to update specified columns of a row in a table.

type GeneratedColumn

type GeneratedColumn struct {
	ID        int64  `spanner:"ID" json:"ID"`               // ID
	FirstName string `spanner:"FirstName" json:"FirstName"` // FirstName
	LastName  string `spanner:"LastName" json:"LastName"`   // LastName
	FullName  string `spanner:"FullName" json:"FullName"`   // FullName
}

GeneratedColumn represents a row from 'GeneratedColumns'.

func FindGeneratedColumn

func FindGeneratedColumn(ctx context.Context, db YODB, id int64) (*GeneratedColumn, error)

FindGeneratedColumn gets a GeneratedColumn by primary key

func ReadGeneratedColumn

func ReadGeneratedColumn(ctx context.Context, db YODB, keys spanner.KeySet) ([]*GeneratedColumn, error)

ReadGeneratedColumn retrieves multiples rows from GeneratedColumn by KeySet as a slice.

func (*GeneratedColumn) Delete

func (gc *GeneratedColumn) Delete(ctx context.Context) *spanner.Mutation

Delete deletes the GeneratedColumn from the database.

func (*GeneratedColumn) Insert

func (gc *GeneratedColumn) Insert(ctx context.Context) *spanner.Mutation

Insert returns a Mutation to insert a row into a table. If the row already exists, the write or transaction fails.

func (*GeneratedColumn) InsertOrUpdate

func (gc *GeneratedColumn) InsertOrUpdate(ctx context.Context) *spanner.Mutation

InsertOrUpdate returns a Mutation to insert a row into a table. If the row already exists, it updates it instead. Any column values not explicitly written are preserved.

func (*GeneratedColumn) Replace

func (gc *GeneratedColumn) Replace(ctx context.Context) *spanner.Mutation

Replace returns a Mutation to insert a row into a table, deleting any existing row. Unlike InsertOrUpdate, this means any values not explicitly written become NULL.

func (*GeneratedColumn) Update

func (gc *GeneratedColumn) Update(ctx context.Context) *spanner.Mutation

Update returns a Mutation to update a row in a table. If the row does not already exist, the write or transaction fails.

func (*GeneratedColumn) UpdateColumns

func (gc *GeneratedColumn) UpdateColumns(ctx context.Context, cols ...string) (*spanner.Mutation, error)

UpdateColumns returns a Mutation to update specified columns of a row in a table.

type Inflection

type Inflection struct {
	X string `spanner:"X" json:"X"` // X
	Y string `spanner:"Y" json:"Y"` // Y
}

Inflection represents a row from 'Inflectionzz'.

func FindInflection

func FindInflection(ctx context.Context, db YODB, x string) (*Inflection, error)

FindInflection gets a Inflection by primary key

func ReadInflection

func ReadInflection(ctx context.Context, db YODB, keys spanner.KeySet) ([]*Inflection, error)

ReadInflection retrieves multiples rows from Inflection by KeySet as a slice.

func (*Inflection) Delete

func (i *Inflection) Delete(ctx context.Context) *spanner.Mutation

Delete deletes the Inflection from the database.

func (*Inflection) Insert

func (i *Inflection) Insert(ctx context.Context) *spanner.Mutation

Insert returns a Mutation to insert a row into a table. If the row already exists, the write or transaction fails.

func (*Inflection) InsertOrUpdate

func (i *Inflection) InsertOrUpdate(ctx context.Context) *spanner.Mutation

InsertOrUpdate returns a Mutation to insert a row into a table. If the row already exists, it updates it instead. Any column values not explicitly written are preserved.

func (*Inflection) Replace

func (i *Inflection) Replace(ctx context.Context) *spanner.Mutation

Replace returns a Mutation to insert a row into a table, deleting any existing row. Unlike InsertOrUpdate, this means any values not explicitly written become NULL.

func (*Inflection) Update

func (i *Inflection) Update(ctx context.Context) *spanner.Mutation

Update returns a Mutation to update a row in a table. If the row does not already exist, the write or transaction fails.

func (*Inflection) UpdateColumns

func (i *Inflection) UpdateColumns(ctx context.Context, cols ...string) (*spanner.Mutation, error)

UpdateColumns returns a Mutation to update specified columns of a row in a table.

type Item

type Item struct {
	ID    int64 `spanner:"ID" json:"ID"`       // ID
	Price int64 `spanner:"Price" json:"Price"` // Price
}

Item represents a row from 'Items'.

func FindItem

func FindItem(ctx context.Context, db YODB, id int64) (*Item, error)

FindItem gets a Item by primary key

func ReadItem

func ReadItem(ctx context.Context, db YODB, keys spanner.KeySet) ([]*Item, error)

ReadItem retrieves multiples rows from Item by KeySet as a slice.

func (*Item) Delete

func (i *Item) Delete(ctx context.Context) *spanner.Mutation

Delete deletes the Item from the database.

func (*Item) Insert

func (i *Item) Insert(ctx context.Context) *spanner.Mutation

Insert returns a Mutation to insert a row into a table. If the row already exists, the write or transaction fails.

func (*Item) InsertOrUpdate

func (i *Item) InsertOrUpdate(ctx context.Context) *spanner.Mutation

InsertOrUpdate returns a Mutation to insert a row into a table. If the row already exists, it updates it instead. Any column values not explicitly written are preserved.

func (*Item) Replace

func (i *Item) Replace(ctx context.Context) *spanner.Mutation

Replace returns a Mutation to insert a row into a table, deleting any existing row. Unlike InsertOrUpdate, this means any values not explicitly written become NULL.

func (*Item) Update

func (i *Item) Update(ctx context.Context) *spanner.Mutation

Update returns a Mutation to update a row in a table. If the row does not already exist, the write or transaction fails.

func (*Item) UpdateColumns

func (i *Item) UpdateColumns(ctx context.Context, cols ...string) (*spanner.Mutation, error)

UpdateColumns returns a Mutation to update specified columns of a row in a table.

type MaxLength

type MaxLength struct {
	MaxString string `spanner:"MaxString" json:"MaxString"` // MaxString
	MaxBytes  []byte `spanner:"MaxBytes" json:"MaxBytes"`   // MaxBytes
}

MaxLength represents a row from 'MaxLengths'.

func FindMaxLength

func FindMaxLength(ctx context.Context, db YODB, maxString string) (*MaxLength, error)

FindMaxLength gets a MaxLength by primary key

func ReadMaxLength

func ReadMaxLength(ctx context.Context, db YODB, keys spanner.KeySet) ([]*MaxLength, error)

ReadMaxLength retrieves multiples rows from MaxLength by KeySet as a slice.

func (*MaxLength) Delete

func (ml *MaxLength) Delete(ctx context.Context) *spanner.Mutation

Delete deletes the MaxLength from the database.

func (*MaxLength) Insert

func (ml *MaxLength) Insert(ctx context.Context) *spanner.Mutation

Insert returns a Mutation to insert a row into a table. If the row already exists, the write or transaction fails.

func (*MaxLength) InsertOrUpdate

func (ml *MaxLength) InsertOrUpdate(ctx context.Context) *spanner.Mutation

InsertOrUpdate returns a Mutation to insert a row into a table. If the row already exists, it updates it instead. Any column values not explicitly written are preserved.

func (*MaxLength) Replace

func (ml *MaxLength) Replace(ctx context.Context) *spanner.Mutation

Replace returns a Mutation to insert a row into a table, deleting any existing row. Unlike InsertOrUpdate, this means any values not explicitly written become NULL.

func (*MaxLength) Update

func (ml *MaxLength) Update(ctx context.Context) *spanner.Mutation

Update returns a Mutation to update a row in a table. If the row does not already exist, the write or transaction fails.

func (*MaxLength) UpdateColumns

func (ml *MaxLength) UpdateColumns(ctx context.Context, cols ...string) (*spanner.Mutation, error)

UpdateColumns returns a Mutation to update specified columns of a row in a table.

type OutOfOrderPrimaryKey

type OutOfOrderPrimaryKey struct {
	PKey1 string `spanner:"PKey1" json:"PKey1"` // PKey1
	PKey2 string `spanner:"PKey2" json:"PKey2"` // PKey2
	PKey3 string `spanner:"PKey3" json:"PKey3"` // PKey3
}

OutOfOrderPrimaryKey represents a row from 'OutOfOrderPrimaryKeys'.

func (*OutOfOrderPrimaryKey) Delete

func (ooopk *OutOfOrderPrimaryKey) Delete(ctx context.Context) *spanner.Mutation

Delete deletes the OutOfOrderPrimaryKey from the database.

func (*OutOfOrderPrimaryKey) Insert

func (ooopk *OutOfOrderPrimaryKey) Insert(ctx context.Context) *spanner.Mutation

Insert returns a Mutation to insert a row into a table. If the row already exists, the write or transaction fails.

type SnakeCase

type SnakeCase struct {
	ID        int64  `spanner:"id" json:"id"`                   // id
	StringID  string `spanner:"string_id" json:"string_id"`     // string_id
	FooBarBaz int64  `spanner:"foo_bar_baz" json:"foo_bar_baz"` // foo_bar_baz
}

SnakeCase represents a row from 'snake_cases'.

func FindSnakeCase

func FindSnakeCase(ctx context.Context, db YODB, id int64) (*SnakeCase, error)

FindSnakeCase gets a SnakeCase by primary key

func FindSnakeCasesBySnakeCasesByStringID

func FindSnakeCasesBySnakeCasesByStringID(ctx context.Context, db YODB, stringID string, fooBarBaz int64) ([]*SnakeCase, error)

FindSnakeCasesBySnakeCasesByStringID retrieves multiple rows from 'snake_cases' as a slice of SnakeCase.

Generated from index 'snake_cases_by_string_id'.

func ReadSnakeCase

func ReadSnakeCase(ctx context.Context, db YODB, keys spanner.KeySet) ([]*SnakeCase, error)

ReadSnakeCase retrieves multiples rows from SnakeCase by KeySet as a slice.

func ReadSnakeCasesBySnakeCasesByStringID

func ReadSnakeCasesBySnakeCasesByStringID(ctx context.Context, db YODB, keys spanner.KeySet) ([]*SnakeCase, error)

ReadSnakeCasesBySnakeCasesByStringID retrieves multiples rows from 'snake_cases' by KeySet as a slice.

This does not retrieve all columns of 'snake_cases' because an index has only columns used for primary key, index key and storing columns. If you need more columns, add storing columns or Read by primary key or Query with join.

Generated from index 'snake_cases_by_string_id'.

func (*SnakeCase) Delete

func (sc *SnakeCase) Delete(ctx context.Context) *spanner.Mutation

Delete deletes the SnakeCase from the database.

func (*SnakeCase) Insert

func (sc *SnakeCase) Insert(ctx context.Context) *spanner.Mutation

Insert returns a Mutation to insert a row into a table. If the row already exists, the write or transaction fails.

func (*SnakeCase) InsertOrUpdate

func (sc *SnakeCase) InsertOrUpdate(ctx context.Context) *spanner.Mutation

InsertOrUpdate returns a Mutation to insert a row into a table. If the row already exists, it updates it instead. Any column values not explicitly written are preserved.

func (*SnakeCase) Replace

func (sc *SnakeCase) Replace(ctx context.Context) *spanner.Mutation

Replace returns a Mutation to insert a row into a table, deleting any existing row. Unlike InsertOrUpdate, this means any values not explicitly written become NULL.

func (*SnakeCase) Update

func (sc *SnakeCase) Update(ctx context.Context) *spanner.Mutation

Update returns a Mutation to update a row in a table. If the row does not already exist, the write or transaction fails.

func (*SnakeCase) UpdateColumns

func (sc *SnakeCase) UpdateColumns(ctx context.Context, cols ...string) (*spanner.Mutation, error)

UpdateColumns returns a Mutation to update specified columns of a row in a table.

type YODB

type YODB interface {
	ReadRow(ctx context.Context, table string, key spanner.Key, columns []string) (*spanner.Row, error)
	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) (ri *spanner.RowIterator)
	Query(ctx context.Context, statement spanner.Statement) *spanner.RowIterator
}

YODB is the common interface for database operations.

Jump to

Keyboard shortcuts

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