Documentation ¶
Overview ¶
Code generated by yo. DO NOT EDIT. Package models contains the types.
Code generated by yo. DO NOT EDIT. Package models contains the types.
Code generated by yo. DO NOT EDIT. Package models contains the types.
Code generated by yo. DO NOT EDIT. Package models contains the types.
Code generated by yo. DO NOT EDIT. Package models contains the types.
Code generated by yo. DO NOT EDIT. Package models contains the types.
Code generated by yo. DO NOT EDIT. Package models contains the types.
Code generated by yo. DO NOT EDIT. Package models contains the types.
Code generated by yo. DO NOT EDIT. Package models contains the types.
Index ¶
- Variables
- func CompositePrimaryKeyColumns() []string
- func CompositePrimaryKeyPrimaryKeys() []string
- func CompositePrimaryKeyWritableColumns() []string
- func FereignItemColumns() []string
- func FereignItemPrimaryKeys() []string
- func FereignItemWritableColumns() []string
- func FullTypeColumns() []string
- func FullTypePrimaryKeys() []string
- func FullTypeWritableColumns() []string
- func GeneratedColumnColumns() []string
- func GeneratedColumnPrimaryKeys() []string
- func GeneratedColumnWritableColumns() []string
- func ItemColumns() []string
- func ItemPrimaryKeys() []string
- func ItemWritableColumns() []string
- func MaxLengthColumns() []string
- func MaxLengthPrimaryKeys() []string
- func MaxLengthWritableColumns() []string
- func OutOfOrderPrimaryKeyColumns() []string
- func OutOfOrderPrimaryKeyPrimaryKeys() []string
- func OutOfOrderPrimaryKeyWritableColumns() []string
- func SnakeCaseColumns() []string
- func SnakeCasePrimaryKeys() []string
- func SnakeCaseWritableColumns() []string
- type CompositePrimaryKey
- func FindCompositePrimaryKey(ctx context.Context, db YORODB, pKey1 string, pKey2 int64) (*CompositePrimaryKey, error)
- func FindCompositePrimaryKeysByError(ctx context.Context, db YORODB, e int64) ([]*CompositePrimaryKey, error)
- func FindCompositePrimaryKeysByXY(ctx context.Context, db YORODB, x string, y string) ([]*CompositePrimaryKey, error)
- func FindCompositePrimaryKeysByZError(ctx context.Context, db YORODB, e int64) ([]*CompositePrimaryKey, error)
- func FindCompositePrimaryKeysByZYError(ctx context.Context, db YORODB, e int64) ([]*CompositePrimaryKey, error)
- func ReadCompositePrimaryKey(ctx context.Context, db YORODB, keys spanner.KeySet) ([]*CompositePrimaryKey, error)
- func ReadCompositePrimaryKeysByError(ctx context.Context, db YORODB, keys spanner.KeySet) ([]*CompositePrimaryKey, error)
- func ReadCompositePrimaryKeysByXY(ctx context.Context, db YORODB, keys spanner.KeySet) ([]*CompositePrimaryKey, error)
- func ReadCompositePrimaryKeysByZError(ctx context.Context, db YORODB, keys spanner.KeySet) ([]*CompositePrimaryKey, error)
- func ReadCompositePrimaryKeysByZYError(ctx context.Context, db YORODB, keys spanner.KeySet) ([]*CompositePrimaryKey, error)
- func (cpk *CompositePrimaryKey) Delete(ctx context.Context) *spanner.Mutation
- func (cpk *CompositePrimaryKey) Insert(ctx context.Context) *spanner.Mutation
- func (cpk *CompositePrimaryKey) InsertOrUpdate(ctx context.Context) *spanner.Mutation
- func (cpk *CompositePrimaryKey) Update(ctx context.Context) *spanner.Mutation
- func (cpk *CompositePrimaryKey) UpdateColumns(ctx context.Context, cols ...string) (*spanner.Mutation, error)
- type FereignItem
- func (fi *FereignItem) Delete(ctx context.Context) *spanner.Mutation
- func (fi *FereignItem) Insert(ctx context.Context) *spanner.Mutation
- func (fi *FereignItem) InsertOrUpdate(ctx context.Context) *spanner.Mutation
- func (fi *FereignItem) Update(ctx context.Context) *spanner.Mutation
- func (fi *FereignItem) UpdateColumns(ctx context.Context, cols ...string) (*spanner.Mutation, error)
- type FullType
- func FindFullType(ctx context.Context, db YORODB, pKey string) (*FullType, error)
- func FindFullTypeByFTString(ctx context.Context, db YORODB, fTString string) (*FullType, error)
- func FindFullTypesByFTIntFTDate(ctx context.Context, db YORODB, fTInt int64, fTDate civil.Date) ([]*FullType, error)
- func FindFullTypesByFTIntFTTimestamp(ctx context.Context, db YORODB, fTInt int64, fTTimestamp time.Time) ([]*FullType, error)
- func FindFullTypesByFTIntFTTimestampNull(ctx context.Context, db YORODB, fTInt int64, fTTimestampNull spanner.NullTime) ([]*FullType, error)
- func FindFullTypesByFTTimestamp(ctx context.Context, db YORODB, fTTimestamp time.Time) ([]*FullType, error)
- func ReadFullType(ctx context.Context, db YORODB, keys spanner.KeySet) ([]*FullType, error)
- func ReadFullTypeByFTString(ctx context.Context, db YORODB, keys spanner.KeySet) ([]*FullType, error)
- func ReadFullTypesByFTIntFTDate(ctx context.Context, db YORODB, keys spanner.KeySet) ([]*FullType, error)
- func ReadFullTypesByFTIntFTTimestamp(ctx context.Context, db YORODB, keys spanner.KeySet) ([]*FullType, error)
- func ReadFullTypesByFTIntFTTimestampNull(ctx context.Context, db YORODB, keys spanner.KeySet) ([]*FullType, error)
- func ReadFullTypesByFTTimestamp(ctx context.Context, db YORODB, keys spanner.KeySet) ([]*FullType, error)
- func (ft *FullType) Delete(ctx context.Context) *spanner.Mutation
- func (ft *FullType) Insert(ctx context.Context) *spanner.Mutation
- func (ft *FullType) InsertOrUpdate(ctx context.Context) *spanner.Mutation
- func (ft *FullType) Update(ctx context.Context) *spanner.Mutation
- func (ft *FullType) UpdateColumns(ctx context.Context, cols ...string) (*spanner.Mutation, error)
- type GeneratedColumn
- func (gc *GeneratedColumn) Delete(ctx context.Context) *spanner.Mutation
- func (gc *GeneratedColumn) Insert(ctx context.Context) *spanner.Mutation
- func (gc *GeneratedColumn) InsertOrUpdate(ctx context.Context) *spanner.Mutation
- func (gc *GeneratedColumn) Update(ctx context.Context) *spanner.Mutation
- func (gc *GeneratedColumn) UpdateColumns(ctx context.Context, cols ...string) (*spanner.Mutation, error)
- type Item
- func (i *Item) Delete(ctx context.Context) *spanner.Mutation
- func (i *Item) Insert(ctx context.Context) *spanner.Mutation
- func (i *Item) InsertOrUpdate(ctx context.Context) *spanner.Mutation
- func (i *Item) Update(ctx context.Context) *spanner.Mutation
- func (i *Item) UpdateColumns(ctx context.Context, cols ...string) (*spanner.Mutation, error)
- type MaxLength
- func (ml *MaxLength) Delete(ctx context.Context) *spanner.Mutation
- func (ml *MaxLength) Insert(ctx context.Context) *spanner.Mutation
- func (ml *MaxLength) InsertOrUpdate(ctx context.Context) *spanner.Mutation
- func (ml *MaxLength) Update(ctx context.Context) *spanner.Mutation
- func (ml *MaxLength) UpdateColumns(ctx context.Context, cols ...string) (*spanner.Mutation, error)
- type OutOfOrderPrimaryKey
- type SnakeCase
- func FindSnakeCase(ctx context.Context, db YORODB, id int64) (*SnakeCase, error)
- func FindSnakeCasesByStringIDFooBarBaz(ctx context.Context, db YORODB, stringID string, fooBarBaz int64) ([]*SnakeCase, error)
- func ReadSnakeCase(ctx context.Context, db YORODB, keys spanner.KeySet) ([]*SnakeCase, error)
- func ReadSnakeCasesByStringIDFooBarBaz(ctx context.Context, db YORODB, keys spanner.KeySet) ([]*SnakeCase, error)
- func (sc *SnakeCase) Delete(ctx context.Context) *spanner.Mutation
- func (sc *SnakeCase) Insert(ctx context.Context) *spanner.Mutation
- func (sc *SnakeCase) InsertOrUpdate(ctx context.Context) *spanner.Mutation
- func (sc *SnakeCase) Update(ctx context.Context) *spanner.Mutation
- func (sc *SnakeCase) UpdateColumns(ctx context.Context, cols ...string) (*spanner.Mutation, error)
- type YODB
- type YORODB
Constants ¶
This section is empty.
Variables ¶
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 ¶ added in v0.4.0
func CompositePrimaryKeyWritableColumns() []string
func FereignItemColumns ¶ added in v0.3.1
func FereignItemColumns() []string
func FereignItemPrimaryKeys ¶ added in v0.3.1
func FereignItemPrimaryKeys() []string
func FereignItemWritableColumns ¶ added in v0.4.0
func FereignItemWritableColumns() []string
func FullTypeColumns ¶
func FullTypeColumns() []string
func FullTypePrimaryKeys ¶
func FullTypePrimaryKeys() []string
func FullTypeWritableColumns ¶ added in v0.4.0
func FullTypeWritableColumns() []string
func GeneratedColumnColumns ¶ added in v0.4.0
func GeneratedColumnColumns() []string
func GeneratedColumnPrimaryKeys ¶ added in v0.4.0
func GeneratedColumnPrimaryKeys() []string
func GeneratedColumnWritableColumns ¶ added in v0.4.0
func GeneratedColumnWritableColumns() []string
func ItemColumns ¶ added in v0.3.1
func ItemColumns() []string
func ItemPrimaryKeys ¶ added in v0.3.1
func ItemPrimaryKeys() []string
func ItemWritableColumns ¶ added in v0.4.0
func ItemWritableColumns() []string
func MaxLengthColumns ¶
func MaxLengthColumns() []string
func MaxLengthPrimaryKeys ¶
func MaxLengthPrimaryKeys() []string
func MaxLengthWritableColumns ¶ added in v0.4.0
func MaxLengthWritableColumns() []string
func OutOfOrderPrimaryKeyColumns ¶ added in v0.3.2
func OutOfOrderPrimaryKeyColumns() []string
func OutOfOrderPrimaryKeyPrimaryKeys ¶ added in v0.3.2
func OutOfOrderPrimaryKeyPrimaryKeys() []string
func OutOfOrderPrimaryKeyWritableColumns ¶ added in v0.4.0
func OutOfOrderPrimaryKeyWritableColumns() []string
func SnakeCaseColumns ¶
func SnakeCaseColumns() []string
func SnakeCasePrimaryKeys ¶
func SnakeCasePrimaryKeys() []string
func SnakeCaseWritableColumns ¶ added in v0.4.0
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 YORODB, pKey1 string, pKey2 int64) (*CompositePrimaryKey, error)
FindCompositePrimaryKey gets a CompositePrimaryKey by primary key
func FindCompositePrimaryKeysByError ¶
func FindCompositePrimaryKeysByError(ctx context.Context, db YORODB, e int64) ([]*CompositePrimaryKey, error)
FindCompositePrimaryKeysByError retrieves multiple rows from 'CompositePrimaryKeys' as a slice of CompositePrimaryKey.
Generated from index 'CompositePrimaryKeysByError'.
func FindCompositePrimaryKeysByXY ¶
func FindCompositePrimaryKeysByXY(ctx context.Context, db YORODB, x string, y string) ([]*CompositePrimaryKey, error)
FindCompositePrimaryKeysByXY retrieves multiple rows from 'CompositePrimaryKeys' as a slice of CompositePrimaryKey.
Generated from index 'CompositePrimaryKeysByXY'.
func FindCompositePrimaryKeysByZError ¶ added in v0.2.0
func FindCompositePrimaryKeysByZError(ctx context.Context, db YORODB, e int64) ([]*CompositePrimaryKey, error)
FindCompositePrimaryKeysByZError retrieves multiple rows from 'CompositePrimaryKeys' as a slice of CompositePrimaryKey.
Generated from index 'CompositePrimaryKeysByError2'.
func FindCompositePrimaryKeysByZYError ¶ added in v0.2.0
func FindCompositePrimaryKeysByZYError(ctx context.Context, db YORODB, e int64) ([]*CompositePrimaryKey, error)
FindCompositePrimaryKeysByZYError retrieves multiple rows from 'CompositePrimaryKeys' as a slice of CompositePrimaryKey.
Generated from index 'CompositePrimaryKeysByError3'.
func ReadCompositePrimaryKey ¶ added in v0.2.0
func ReadCompositePrimaryKey(ctx context.Context, db YORODB, keys spanner.KeySet) ([]*CompositePrimaryKey, error)
ReadCompositePrimaryKey retrieves multiples rows from CompositePrimaryKey by KeySet as a slice.
func ReadCompositePrimaryKeysByError ¶ added in v0.2.0
func ReadCompositePrimaryKeysByError(ctx context.Context, db YORODB, keys spanner.KeySet) ([]*CompositePrimaryKey, error)
ReadCompositePrimaryKeysByError 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 unique index 'CompositePrimaryKeysByError'.
func ReadCompositePrimaryKeysByXY ¶ added in v0.2.0
func ReadCompositePrimaryKeysByXY(ctx context.Context, db YORODB, keys spanner.KeySet) ([]*CompositePrimaryKey, error)
ReadCompositePrimaryKeysByXY 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 unique index 'CompositePrimaryKeysByXY'.
func ReadCompositePrimaryKeysByZError ¶ added in v0.2.0
func ReadCompositePrimaryKeysByZError(ctx context.Context, db YORODB, keys spanner.KeySet) ([]*CompositePrimaryKey, error)
ReadCompositePrimaryKeysByZError 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 unique index 'CompositePrimaryKeysByError2'.
func ReadCompositePrimaryKeysByZYError ¶ added in v0.2.0
func ReadCompositePrimaryKeysByZYError(ctx context.Context, db YORODB, keys spanner.KeySet) ([]*CompositePrimaryKey, error)
ReadCompositePrimaryKeysByZYError 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 unique index 'CompositePrimaryKeysByError3'.
func (*CompositePrimaryKey) Delete ¶
func (cpk *CompositePrimaryKey) Delete(ctx context.Context) *spanner.Mutation
Delete deletes the CompositePrimaryKey from the database.
func (*CompositePrimaryKey) Insert ¶
func (cpk *CompositePrimaryKey) 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 (*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) Update ¶
func (cpk *CompositePrimaryKey) 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 (*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 FereignItem ¶ added in v0.3.1
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 ¶ added in v0.3.1
FindFereignItem gets a FereignItem by primary key
func ReadFereignItem ¶ added in v0.3.1
ReadFereignItem retrieves multiples rows from FereignItem by KeySet as a slice.
func (*FereignItem) Delete ¶ added in v0.3.1
func (fi *FereignItem) Delete(ctx context.Context) *spanner.Mutation
Delete deletes the FereignItem from the database.
func (*FereignItem) Insert ¶ added in v0.3.1
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 ¶ added in v0.3.1
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) Update ¶ added in v0.3.1
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 ¶ added in v0.3.1
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 ¶
FindFullType gets a FullType by primary key
func FindFullTypeByFTString ¶
FindFullTypeByFTString 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 FindFullTypesByFTIntFTDate ¶ added in v0.3.0
func FindFullTypesByFTIntFTDate(ctx context.Context, db YORODB, fTInt int64, fTDate civil.Date) ([]*FullType, error)
FindFullTypesByFTIntFTDate retrieves multiple rows from 'FullTypes' as a slice of FullType.
Generated from index 'FullTypesByIntDate'.
func FindFullTypesByFTIntFTTimestamp ¶
func FindFullTypesByFTIntFTTimestamp(ctx context.Context, db YORODB, fTInt int64, fTTimestamp time.Time) ([]*FullType, error)
FindFullTypesByFTIntFTTimestamp retrieves multiple rows from 'FullTypes' as a slice of FullType.
Generated from index 'FullTypesByIntTimestamp'.
func FindFullTypesByFTIntFTTimestampNull ¶ added in v0.3.0
func FindFullTypesByFTIntFTTimestampNull(ctx context.Context, db YORODB, fTInt int64, fTTimestampNull spanner.NullTime) ([]*FullType, error)
FindFullTypesByFTIntFTTimestampNull retrieves multiple rows from 'FullTypes' as a slice of FullType.
Generated from index 'FullTypesByInTimestampNull'.
func FindFullTypesByFTTimestamp ¶
func FindFullTypesByFTTimestamp(ctx context.Context, db YORODB, fTTimestamp time.Time) ([]*FullType, error)
FindFullTypesByFTTimestamp retrieves multiple rows from 'FullTypes' as a slice of FullType.
Generated from index 'FullTypesByTimestamp'.
func ReadFullType ¶ added in v0.2.0
ReadFullType retrieves multiples rows from FullType by KeySet as a slice.
func ReadFullTypeByFTString ¶ added in v0.2.0
func ReadFullTypeByFTString(ctx context.Context, db YORODB, keys spanner.KeySet) ([]*FullType, error)
ReadFullTypeByFTString 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 unique index 'FullTypesByFTString'.
func ReadFullTypesByFTIntFTDate ¶ added in v0.3.0
func ReadFullTypesByFTIntFTDate(ctx context.Context, db YORODB, keys spanner.KeySet) ([]*FullType, error)
ReadFullTypesByFTIntFTDate 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 unique index 'FullTypesByIntDate'.
func ReadFullTypesByFTIntFTTimestamp ¶ added in v0.2.0
func ReadFullTypesByFTIntFTTimestamp(ctx context.Context, db YORODB, keys spanner.KeySet) ([]*FullType, error)
ReadFullTypesByFTIntFTTimestamp 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 unique index 'FullTypesByIntTimestamp'.
func ReadFullTypesByFTIntFTTimestampNull ¶ added in v0.3.0
func ReadFullTypesByFTIntFTTimestampNull(ctx context.Context, db YORODB, keys spanner.KeySet) ([]*FullType, error)
ReadFullTypesByFTIntFTTimestampNull 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 unique index 'FullTypesByInTimestampNull'.
func ReadFullTypesByFTTimestamp ¶ added in v0.2.0
func ReadFullTypesByFTTimestamp(ctx context.Context, db YORODB, keys spanner.KeySet) ([]*FullType, error)
ReadFullTypesByFTTimestamp 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 unique index 'FullTypesByTimestamp'.
func (*FullType) Insert ¶
Insert returns a Mutation to insert a row into a table. If the row already exists, the write or transaction fails.
func (*FullType) InsertOrUpdate ¶
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.
type GeneratedColumn ¶ added in v0.4.0
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 ¶ added in v0.4.0
FindGeneratedColumn gets a GeneratedColumn by primary key
func ReadGeneratedColumn ¶ added in v0.4.0
func ReadGeneratedColumn(ctx context.Context, db YORODB, keys spanner.KeySet) ([]*GeneratedColumn, error)
ReadGeneratedColumn retrieves multiples rows from GeneratedColumn by KeySet as a slice.
func (*GeneratedColumn) Delete ¶ added in v0.4.0
func (gc *GeneratedColumn) Delete(ctx context.Context) *spanner.Mutation
Delete deletes the GeneratedColumn from the database.
func (*GeneratedColumn) Insert ¶ added in v0.4.0
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 ¶ added in v0.4.0
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) Update ¶ added in v0.4.0
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 ¶ added in v0.4.0
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 Item ¶ added in v0.3.1
type Item struct { ID int64 `spanner:"ID" json:"ID"` // ID Price int64 `spanner:"Price" json:"Price"` // Price }
Item represents a row from 'Items'.
func (*Item) Insert ¶ added in v0.3.1
Insert returns a Mutation to insert a row into a table. If the row already exists, the write or transaction fails.
func (*Item) InsertOrUpdate ¶ added in v0.3.1
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.
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 ¶
FindMaxLength gets a MaxLength by primary key
func ReadMaxLength ¶ added in v0.2.0
ReadMaxLength retrieves multiples rows from MaxLength by KeySet as a slice.
func (*MaxLength) Insert ¶
Insert returns a Mutation to insert a row into a table. If the row already exists, the write or transaction fails.
func (*MaxLength) InsertOrUpdate ¶
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.
type OutOfOrderPrimaryKey ¶ added in v0.3.2
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'.
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 ¶
FindSnakeCase gets a SnakeCase by primary key
func FindSnakeCasesByStringIDFooBarBaz ¶
func FindSnakeCasesByStringIDFooBarBaz(ctx context.Context, db YORODB, stringID string, fooBarBaz int64) ([]*SnakeCase, error)
FindSnakeCasesByStringIDFooBarBaz retrieves multiple rows from 'snake_cases' as a slice of SnakeCase.
Generated from index 'snake_cases_by_string_id'.
func ReadSnakeCase ¶ added in v0.2.0
ReadSnakeCase retrieves multiples rows from SnakeCase by KeySet as a slice.
func ReadSnakeCasesByStringIDFooBarBaz ¶ added in v0.2.0
func ReadSnakeCasesByStringIDFooBarBaz(ctx context.Context, db YORODB, keys spanner.KeySet) ([]*SnakeCase, error)
ReadSnakeCasesByStringIDFooBarBaz 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 unique index 'snake_cases_by_string_id'.
func (*SnakeCase) Insert ¶
Insert returns a Mutation to insert a row into a table. If the row already exists, the write or transaction fails.
func (*SnakeCase) InsertOrUpdate ¶
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.
type YORODB ¶
type YORODB 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 }
YORODB is the common interface for database operations.