model

package
v0.11.4 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2021 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const C_Model1 int64 = 2074613123
View Source
const C_Model2 int64 = 3802219577
View Source
const C_Model3 int64 = 2510714031

Variables

View Source
var (
	Enum_name = map[int32]string{
		0: "None",
		1: "Something",
		2: "Else",
	}
	Enum_value = map[string]int32{
		"None":      0,
		"Something": 1,
		"Else":      2,
	}
)

Enum value maps for Enum.

View Source
var File_model_proto protoreflect.FileDescriptor
View Source
var PoolModel1 = poolModel1{}
View Source
var PoolModel2 = poolModel2{}
View Source
var PoolModel3 = poolModel3{}

Functions

func CreateModel1 added in v0.5.25

func CreateModel1(m *Model1) error

func CreateModel1WithTxn added in v0.5.25

func CreateModel1WithTxn(txn *rony.StoreTxn, alloc *tools.Allocator, m *Model1) (err error)

func CreateModel2 added in v0.5.25

func CreateModel2(m *Model2) error

func CreateModel2WithTxn added in v0.5.25

func CreateModel2WithTxn(txn *rony.StoreTxn, alloc *tools.Allocator, m *Model2) (err error)

func CreateModel3 added in v0.11.1

func CreateModel3(m *Model3) error

func CreateModel3WithTxn added in v0.11.1

func CreateModel3WithTxn(txn *rony.StoreTxn, alloc *tools.Allocator, m *Model3) (err error)

func DeleteModel1

func DeleteModel1(id int32, shardKey int32) error

func DeleteModel1WithTxn added in v0.3.12

func DeleteModel1WithTxn(txn *rony.StoreTxn, alloc *tools.Allocator, id int32, shardKey int32) error

func DeleteModel2

func DeleteModel2(id int64, shardKey int32, p1 string) error

func DeleteModel2WithTxn added in v0.3.12

func DeleteModel2WithTxn(txn *rony.StoreTxn, alloc *tools.Allocator, id int64, shardKey int32, p1 string) error

func DeleteModel3 added in v0.11.1

func DeleteModel3(id int64, shardKey int32, p1 []byte) error

func DeleteModel3WithTxn added in v0.11.1

func DeleteModel3WithTxn(txn *rony.StoreTxn, alloc *tools.Allocator, id int64, shardKey int32, p1 []byte) error

func IterModel1 added in v0.3.14

func IterModel1(txn *rony.StoreTxn, alloc *tools.Allocator, cb func(m *Model1) bool, orderBy ...Model1Order) error

func IterModel1ByEnum0 added in v0.11.1

func IterModel1ByEnum0(
	txn *rony.StoreTxn, alloc *tools.Allocator, enum Enum, cb func(m *Model1) bool,
) error

func IterModel1ByID added in v0.3.13

func IterModel1ByID(
	txn *rony.StoreTxn, alloc *tools.Allocator, id int32, cb func(m *Model1) bool,
) error

func IterModel2 added in v0.3.14

func IterModel2(txn *rony.StoreTxn, alloc *tools.Allocator, cb func(m *Model2) bool, orderBy ...Model2Order) error

func IterModel2ByIDAndShardKey added in v0.3.13

func IterModel2ByIDAndShardKey(
	txn *rony.StoreTxn, alloc *tools.Allocator, id int64, shardKey int32, cb func(m *Model2) bool,
) error

func IterModel2ByP10 added in v0.11.1

func IterModel2ByP10(
	txn *rony.StoreTxn, alloc *tools.Allocator, p1 string, cb func(m *Model2) bool,
) error

func IterModel3 added in v0.11.1

func IterModel3(txn *rony.StoreTxn, alloc *tools.Allocator, cb func(m *Model3) bool, orderBy ...Model3Order) error

func IterModel3ByIDAndShardKey added in v0.11.1

func IterModel3ByIDAndShardKey(
	txn *rony.StoreTxn, alloc *tools.Allocator, id int64, shardKey int32, cb func(m *Model3) bool,
) error

func IterModel3ByP10 added in v0.11.1

func IterModel3ByP10(
	txn *rony.StoreTxn, alloc *tools.Allocator, p1 []byte, cb func(m *Model3) bool,
) error

func IterModel3ByP11 added in v0.11.1

func IterModel3ByP11(
	txn *rony.StoreTxn, alloc *tools.Allocator, p1 []byte, cb func(m *Model3) bool,
) error

func SaveModel1

func SaveModel1(m *Model1) error

func SaveModel1WithTxn added in v0.3.8

func SaveModel1WithTxn(txn *rony.StoreTxn, alloc *tools.Allocator, m *Model1) (err error)

func SaveModel2

func SaveModel2(m *Model2) error

func SaveModel2WithTxn added in v0.3.8

func SaveModel2WithTxn(txn *rony.StoreTxn, alloc *tools.Allocator, m *Model2) (err error)

func SaveModel3 added in v0.11.1

func SaveModel3(m *Model3) error

func SaveModel3WithTxn added in v0.11.1

func SaveModel3WithTxn(txn *rony.StoreTxn, alloc *tools.Allocator, m *Model3) (err error)

func UpdateModel1 added in v0.5.25

func UpdateModel1(id int32, shardKey int32, m *Model1) error

func UpdateModel1WithTxn added in v0.5.25

func UpdateModel1WithTxn(txn *rony.StoreTxn, alloc *tools.Allocator, m *Model1) error

func UpdateModel2 added in v0.5.25

func UpdateModel2(id int64, shardKey int32, p1 string, m *Model2) error

func UpdateModel2WithTxn added in v0.5.25

func UpdateModel2WithTxn(txn *rony.StoreTxn, alloc *tools.Allocator, m *Model2) error

func UpdateModel3 added in v0.11.1

func UpdateModel3(id int64, shardKey int32, p1 []byte, m *Model3) error

func UpdateModel3WithTxn added in v0.11.1

func UpdateModel3WithTxn(txn *rony.StoreTxn, alloc *tools.Allocator, m *Model3) error

Types

type Enum added in v0.3.9

type Enum int32
const (
	Enum_None      Enum = 0
	Enum_Something Enum = 1
	Enum_Else      Enum = 2
)

func (Enum) Descriptor added in v0.3.9

func (Enum) Descriptor() protoreflect.EnumDescriptor

func (Enum) Enum added in v0.3.9

func (x Enum) Enum() *Enum

func (Enum) EnumDescriptor deprecated added in v0.3.9

func (Enum) EnumDescriptor() ([]byte, []int)

Deprecated: Use Enum.Descriptor instead.

func (Enum) Number added in v0.3.9

func (x Enum) Number() protoreflect.EnumNumber

func (Enum) String added in v0.3.9

func (x Enum) String() string

func (Enum) Type added in v0.3.9

func (Enum) Type() protoreflect.EnumType

type Model1

type Model1 struct {
	ID       int32    `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"`
	ShardKey int32    `protobuf:"varint,2,opt,name=ShardKey,proto3" json:"ShardKey,omitempty"`
	P1       string   `protobuf:"bytes,3,opt,name=P1,proto3" json:"P1,omitempty"`
	P2       []string `protobuf:"bytes,4,rep,name=P2,proto3" json:"P2,omitempty"`
	P5       uint64   `protobuf:"varint,5,opt,name=P5,proto3" json:"P5,omitempty"`
	Enum     Enum     `protobuf:"varint,7,opt,name=Enum,proto3,enum=model.Enum" json:"Enum,omitempty"`
	// contains filtered or unexported fields
}

func ListModel1 added in v0.3.6

func ListModel1(
	offsetID int32, offsetShardKey int32, lo *store.ListOption, cond func(m *Model1) bool, orderBy ...Model1Order,
) ([]*Model1, error)

func ListModel1ByEnum0 added in v0.11.1

func ListModel1ByEnum0(
	enum Enum, offsetShardKey int32, offsetID int32, lo *store.ListOption, cond func(m *Model1) bool,
) ([]*Model1, error)

func ListModel1ByID added in v0.3.10

func ListModel1ByID(
	id int32, offsetShardKey int32, lo *store.ListOption, cond func(m *Model1) bool,
) ([]*Model1, error)

func ListModel1ByP1 added in v0.3.9

func ListModel1ByP1(
	P1 string, lo *store.ListOption, cond func(m *Model1) bool,
) ([]*Model1, error)

func ListModel1ByP2 added in v0.3.9

func ListModel1ByP2(
	P2 string, lo *store.ListOption, cond func(m *Model1) bool,
) ([]*Model1, error)

func ReadModel1

func ReadModel1(id int32, shardKey int32, m *Model1) (*Model1, error)

func ReadModel1ByEnumAndShardKeyAndID added in v0.3.9

func ReadModel1ByEnumAndShardKeyAndID(enum Enum, shardKey int32, id int32, m *Model1) (*Model1, error)

func ReadModel1ByEnumAndShardKeyAndIDWithTxn added in v0.3.9

func ReadModel1ByEnumAndShardKeyAndIDWithTxn(
	txn *rony.StoreTxn, alloc *tools.Allocator,
	enum Enum, shardKey int32, id int32, m *Model1,
) (*Model1, error)

func ReadModel1WithTxn added in v0.3.8

func ReadModel1WithTxn(txn *rony.StoreTxn, alloc *tools.Allocator, id int32, shardKey int32, m *Model1) (*Model1, error)

func (*Model1) DeepCopy

func (x *Model1) DeepCopy(z *Model1)

func (*Model1) Descriptor deprecated

func (*Model1) Descriptor() ([]byte, []int)

Deprecated: Use Model1.ProtoReflect.Descriptor instead.

func (*Model1) GetEnum added in v0.3.9

func (x *Model1) GetEnum() Enum

func (*Model1) GetID

func (x *Model1) GetID() int32

func (*Model1) GetP1

func (x *Model1) GetP1() string

func (*Model1) GetP2

func (x *Model1) GetP2() []string

func (*Model1) GetP5

func (x *Model1) GetP5() uint64

func (*Model1) GetShardKey

func (x *Model1) GetShardKey() int32

func (*Model1) HasP2 added in v0.3.8

func (x *Model1) HasP2(xx string) bool

func (*Model1) Marshal

func (x *Model1) Marshal() ([]byte, error)

func (*Model1) MarshalJSON added in v0.10.3

func (x *Model1) MarshalJSON() ([]byte, error)

func (*Model1) ProtoMessage

func (*Model1) ProtoMessage()

func (*Model1) ProtoReflect

func (x *Model1) ProtoReflect() protoreflect.Message

func (*Model1) PushToContext

func (x *Model1) PushToContext(ctx *edge.RequestCtx)

func (*Model1) Reset

func (x *Model1) Reset()

func (*Model1) String

func (x *Model1) String() string

func (*Model1) Unmarshal

func (x *Model1) Unmarshal(b []byte) error

func (*Model1) UnmarshalJSON added in v0.10.3

func (x *Model1) UnmarshalJSON(b []byte) error

type Model1Order added in v0.8.3

type Model1Order string
const (
	Model1OrderByEnum Model1Order = "Enum"
)

type Model2

type Model2 struct {
	ID       int64    `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"`
	ShardKey int32    `protobuf:"varint,2,opt,name=ShardKey,proto3" json:"ShardKey,omitempty"`
	P1       string   `protobuf:"bytes,3,opt,name=P1,proto3" json:"P1,omitempty"`
	P2       []string `protobuf:"bytes,4,rep,name=P2,proto3" json:"P2,omitempty"`
	P5       uint64   `protobuf:"varint,5,opt,name=P5,proto3" json:"P5,omitempty"`
	// contains filtered or unexported fields
}

func ListModel2 added in v0.3.6

func ListModel2(
	offsetID int64, offsetShardKey int32, offsetP1 string, lo *store.ListOption, cond func(m *Model2) bool, orderBy ...Model2Order,
) ([]*Model2, error)

func ListModel2ByIDAndShardKey added in v0.3.10

func ListModel2ByIDAndShardKey(
	id int64, shardKey int32, offsetP1 string, lo *store.ListOption, cond func(m *Model2) bool,
) ([]*Model2, error)

func ListModel2ByP10 added in v0.11.1

func ListModel2ByP10(
	p1 string, offsetShardKey int32, offsetID int64, lo *store.ListOption, cond func(m *Model2) bool,
) ([]*Model2, error)

func ReadModel2

func ReadModel2(id int64, shardKey int32, p1 string, m *Model2) (*Model2, error)

func ReadModel2ByP1AndShardKeyAndID

func ReadModel2ByP1AndShardKeyAndID(p1 string, shardKey int32, id int64, m *Model2) (*Model2, error)

func ReadModel2ByP1AndShardKeyAndIDWithTxn added in v0.3.8

func ReadModel2ByP1AndShardKeyAndIDWithTxn(
	txn *rony.StoreTxn, alloc *tools.Allocator,
	p1 string, shardKey int32, id int64, m *Model2,
) (*Model2, error)

func ReadModel2WithTxn added in v0.3.8

func ReadModel2WithTxn(txn *rony.StoreTxn, alloc *tools.Allocator, id int64, shardKey int32, p1 string, m *Model2) (*Model2, error)

func (*Model2) DeepCopy

func (x *Model2) DeepCopy(z *Model2)

func (*Model2) Descriptor deprecated

func (*Model2) Descriptor() ([]byte, []int)

Deprecated: Use Model2.ProtoReflect.Descriptor instead.

func (*Model2) GetID

func (x *Model2) GetID() int64

func (*Model2) GetP1

func (x *Model2) GetP1() string

func (*Model2) GetP2

func (x *Model2) GetP2() []string

func (*Model2) GetP5

func (x *Model2) GetP5() uint64

func (*Model2) GetShardKey

func (x *Model2) GetShardKey() int32

func (*Model2) HasP2 added in v0.3.8

func (x *Model2) HasP2(xx string) bool

func (*Model2) Marshal

func (x *Model2) Marshal() ([]byte, error)

func (*Model2) MarshalJSON added in v0.10.3

func (x *Model2) MarshalJSON() ([]byte, error)

func (*Model2) ProtoMessage

func (*Model2) ProtoMessage()

func (*Model2) ProtoReflect

func (x *Model2) ProtoReflect() protoreflect.Message

func (*Model2) PushToContext

func (x *Model2) PushToContext(ctx *edge.RequestCtx)

func (*Model2) Reset

func (x *Model2) Reset()

func (*Model2) String

func (x *Model2) String() string

func (*Model2) Unmarshal

func (x *Model2) Unmarshal(b []byte) error

func (*Model2) UnmarshalJSON added in v0.10.3

func (x *Model2) UnmarshalJSON(b []byte) error

type Model2Order added in v0.8.3

type Model2Order string
const (
	Model2OrderByP1 Model2Order = "P1"
)

type Model3 added in v0.11.1

type Model3 struct {
	ID       int64    `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"`
	ShardKey int32    `protobuf:"varint,2,opt,name=ShardKey,proto3" json:"ShardKey,omitempty"`
	P1       []byte   `protobuf:"bytes,3,opt,name=P1,proto3" json:"P1,omitempty"`
	P2       []string `protobuf:"bytes,4,rep,name=P2,proto3" json:"P2,omitempty"`
	P5       [][]byte `protobuf:"bytes,5,rep,name=P5,proto3" json:"P5,omitempty"`
	// contains filtered or unexported fields
}

func ListModel3 added in v0.11.1

func ListModel3(
	offsetID int64, offsetShardKey int32, offsetP1 []byte, lo *store.ListOption, cond func(m *Model3) bool, orderBy ...Model3Order,
) ([]*Model3, error)

func ListModel3ByIDAndShardKey added in v0.11.1

func ListModel3ByIDAndShardKey(
	id int64, shardKey int32, offsetP1 []byte, lo *store.ListOption, cond func(m *Model3) bool,
) ([]*Model3, error)

func ListModel3ByP10 added in v0.11.1

func ListModel3ByP10(
	p1 []byte, offsetShardKey int32, offsetID int64, lo *store.ListOption, cond func(m *Model3) bool,
) ([]*Model3, error)

func ListModel3ByP11 added in v0.11.1

func ListModel3ByP11(
	p1 []byte, offsetID int64, lo *store.ListOption, cond func(m *Model3) bool,
) ([]*Model3, error)

func ListModel3ByP5 added in v0.11.1

func ListModel3ByP5(
	P5 []byte, lo *store.ListOption, cond func(m *Model3) bool,
) ([]*Model3, error)

func ReadModel3 added in v0.11.1

func ReadModel3(id int64, shardKey int32, p1 []byte, m *Model3) (*Model3, error)

func ReadModel3ByP1AndID added in v0.11.1

func ReadModel3ByP1AndID(p1 []byte, id int64, m *Model3) (*Model3, error)

func ReadModel3ByP1AndIDWithTxn added in v0.11.1

func ReadModel3ByP1AndIDWithTxn(
	txn *rony.StoreTxn, alloc *tools.Allocator,
	p1 []byte, id int64, m *Model3,
) (*Model3, error)

func ReadModel3ByP1AndShardKeyAndID added in v0.11.1

func ReadModel3ByP1AndShardKeyAndID(p1 []byte, shardKey int32, id int64, m *Model3) (*Model3, error)

func ReadModel3ByP1AndShardKeyAndIDWithTxn added in v0.11.1

func ReadModel3ByP1AndShardKeyAndIDWithTxn(
	txn *rony.StoreTxn, alloc *tools.Allocator,
	p1 []byte, shardKey int32, id int64, m *Model3,
) (*Model3, error)

func ReadModel3WithTxn added in v0.11.1

func ReadModel3WithTxn(txn *rony.StoreTxn, alloc *tools.Allocator, id int64, shardKey int32, p1 []byte, m *Model3) (*Model3, error)

func (*Model3) DeepCopy added in v0.11.1

func (x *Model3) DeepCopy(z *Model3)

func (*Model3) Descriptor deprecated added in v0.11.1

func (*Model3) Descriptor() ([]byte, []int)

Deprecated: Use Model3.ProtoReflect.Descriptor instead.

func (*Model3) GetID added in v0.11.1

func (x *Model3) GetID() int64

func (*Model3) GetP1 added in v0.11.1

func (x *Model3) GetP1() []byte

func (*Model3) GetP2 added in v0.11.1

func (x *Model3) GetP2() []string

func (*Model3) GetP5 added in v0.11.1

func (x *Model3) GetP5() [][]byte

func (*Model3) GetShardKey added in v0.11.1

func (x *Model3) GetShardKey() int32

func (*Model3) HasP2 added in v0.11.1

func (x *Model3) HasP2(xx string) bool

func (*Model3) HasP5 added in v0.11.1

func (x *Model3) HasP5(xx []byte) bool

func (*Model3) Marshal added in v0.11.1

func (x *Model3) Marshal() ([]byte, error)

func (*Model3) MarshalJSON added in v0.11.1

func (x *Model3) MarshalJSON() ([]byte, error)

func (*Model3) ProtoMessage added in v0.11.1

func (*Model3) ProtoMessage()

func (*Model3) ProtoReflect added in v0.11.1

func (x *Model3) ProtoReflect() protoreflect.Message

func (*Model3) PushToContext added in v0.11.1

func (x *Model3) PushToContext(ctx *edge.RequestCtx)

func (*Model3) Reset added in v0.11.1

func (x *Model3) Reset()

func (*Model3) String added in v0.11.1

func (x *Model3) String() string

func (*Model3) Unmarshal added in v0.11.1

func (x *Model3) Unmarshal(b []byte) error

func (*Model3) UnmarshalJSON added in v0.11.1

func (x *Model3) UnmarshalJSON(b []byte) error

type Model3Order added in v0.11.1

type Model3Order string
const (
	Model3OrderByP1 Model3Order = "P1"
)

Jump to

Keyboard shortcuts

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