postgres_arrays

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_postgres_arrays_postgres_arrays_proto protoreflect.FileDescriptor

Functions

func DefaultDeleteExample

func DefaultDeleteExample(ctx context.Context, in *Example, db *gorm.DB) error

func DefaultDeleteExampleSet

func DefaultDeleteExampleSet(ctx context.Context, in []*Example, db *gorm.DB) error

Types

type Example

type Example struct {

	// id for example
	Id             string    `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Description    string    `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	ArrayOfBools   []bool    `protobuf:"varint,20,rep,packed,name=array_of_bools,json=arrayOfBools,proto3" json:"array_of_bools,omitempty"`
	ArrayOfFloat64 []float64 `protobuf:"fixed64,30,rep,packed,name=array_of_float64,json=arrayOfFloat64,proto3" json:"array_of_float64,omitempty"`
	ArrayOfInt64   []int64   `protobuf:"varint,40,rep,packed,name=array_of_int64,json=arrayOfInt64,proto3" json:"array_of_int64,omitempty"`
	ArrayOfString  []string  `protobuf:"bytes,50,rep,name=array_of_string,json=arrayOfString,proto3" json:"array_of_string,omitempty"`
	// contains filtered or unexported fields
}

func DefaultApplyFieldMaskExample

func DefaultApplyFieldMaskExample(ctx context.Context, patchee *Example, patcher *Example, updateMask *field_mask.FieldMask, prefix string, db *gorm.DB) (*Example, error)

DefaultApplyFieldMaskExample patches an pbObject with patcher according to a field mask.

func DefaultCreateExample

func DefaultCreateExample(ctx context.Context, in *Example, db *gorm.DB) (*Example, error)

DefaultCreateExample executes a basic gorm create call

func DefaultListExample

func DefaultListExample(ctx context.Context, db *gorm.DB) ([]*Example, error)

DefaultListExample executes a gorm list call

func DefaultPatchExample

func DefaultPatchExample(ctx context.Context, in *Example, updateMask *field_mask.FieldMask, db *gorm.DB) (*Example, error)

DefaultPatchExample executes a basic gorm update call with patch behavior

func DefaultPatchSetExample

func DefaultPatchSetExample(ctx context.Context, objects []*Example, updateMasks []*field_mask.FieldMask, db *gorm.DB) ([]*Example, error)

DefaultPatchSetExample executes a bulk gorm update call with patch behavior

func DefaultReadExample

func DefaultReadExample(ctx context.Context, in *Example, db *gorm.DB) (*Example, error)

func DefaultStrictUpdateExample

func DefaultStrictUpdateExample(ctx context.Context, in *Example, db *gorm.DB) (*Example, error)

DefaultStrictUpdateExample clears / replaces / appends first level 1:many children and then executes a gorm update call

func (*Example) Descriptor deprecated

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

Deprecated: Use Example.ProtoReflect.Descriptor instead.

func (*Example) GetArrayOfBools

func (x *Example) GetArrayOfBools() []bool

func (*Example) GetArrayOfFloat64

func (x *Example) GetArrayOfFloat64() []float64

func (*Example) GetArrayOfInt64

func (x *Example) GetArrayOfInt64() []int64

func (*Example) GetArrayOfString

func (x *Example) GetArrayOfString() []string

func (*Example) GetDescription

func (x *Example) GetDescription() string

func (*Example) GetId

func (x *Example) GetId() string

func (*Example) ProtoMessage

func (*Example) ProtoMessage()

func (*Example) ProtoReflect

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

func (*Example) Reset

func (x *Example) Reset()

func (*Example) String

func (x *Example) String() string

func (*Example) ToORM

func (m *Example) ToORM(ctx context.Context) (ExampleORM, error)

ToORM runs the BeforeToORM hook if present, converts the fields of this object to ORM format, runs the AfterToORM hook, then returns the ORM object

type ExampleORM

type ExampleORM struct {
	ArrayOfBools   pq.BoolArray    `gorm:"type:bool[]"`
	ArrayOfFloat64 pq.Float64Array `gorm:"type:float[]"`
	ArrayOfInt64   pq.Int64Array   `gorm:"type:integer[]"`
	ArrayOfString  pq.StringArray  `gorm:"type:text[]"`
	Description    string
	Id             string `gorm:"type:uuid;primaryKey"`
}

func (ExampleORM) TableName

func (ExampleORM) TableName() string

TableName overrides the default tablename generated by GORM

func (*ExampleORM) ToPB

func (m *ExampleORM) ToPB(ctx context.Context) (Example, error)

ToPB runs the BeforeToPB hook if present, converts the fields of this object to PB format, runs the AfterToPB hook, then returns the PB object

type ExampleORMWithAfterCreate_

type ExampleORMWithAfterCreate_ interface {
	AfterCreate_(context.Context, *gorm.DB) error
}

type ExampleORMWithAfterDeleteSet

type ExampleORMWithAfterDeleteSet interface {
	AfterDeleteSet(context.Context, []*Example, *gorm.DB) error
}

type ExampleORMWithAfterDelete_

type ExampleORMWithAfterDelete_ interface {
	AfterDelete_(context.Context, *gorm.DB) error
}

type ExampleORMWithAfterListFind

type ExampleORMWithAfterListFind interface {
	AfterListFind(context.Context, *gorm.DB, *[]ExampleORM) error
}

type ExampleORMWithAfterReadFind

type ExampleORMWithAfterReadFind interface {
	AfterReadFind(context.Context, *gorm.DB) error
}

type ExampleORMWithAfterStrictUpdateSave

type ExampleORMWithAfterStrictUpdateSave interface {
	AfterStrictUpdateSave(context.Context, *gorm.DB) error
}

type ExampleORMWithBeforeCreate_

type ExampleORMWithBeforeCreate_ interface {
	BeforeCreate_(context.Context, *gorm.DB) (*gorm.DB, error)
}

type ExampleORMWithBeforeDeleteSet

type ExampleORMWithBeforeDeleteSet interface {
	BeforeDeleteSet(context.Context, []*Example, *gorm.DB) (*gorm.DB, error)
}

type ExampleORMWithBeforeDelete_

type ExampleORMWithBeforeDelete_ interface {
	BeforeDelete_(context.Context, *gorm.DB) (*gorm.DB, error)
}

type ExampleORMWithBeforeListApplyQuery

type ExampleORMWithBeforeListApplyQuery interface {
	BeforeListApplyQuery(context.Context, *gorm.DB) (*gorm.DB, error)
}

type ExampleORMWithBeforeListFind

type ExampleORMWithBeforeListFind interface {
	BeforeListFind(context.Context, *gorm.DB) (*gorm.DB, error)
}

type ExampleORMWithBeforeReadApplyQuery

type ExampleORMWithBeforeReadApplyQuery interface {
	BeforeReadApplyQuery(context.Context, *gorm.DB) (*gorm.DB, error)
}

type ExampleORMWithBeforeReadFind

type ExampleORMWithBeforeReadFind interface {
	BeforeReadFind(context.Context, *gorm.DB) (*gorm.DB, error)
}

type ExampleORMWithBeforeStrictUpdateCleanup

type ExampleORMWithBeforeStrictUpdateCleanup interface {
	BeforeStrictUpdateCleanup(context.Context, *gorm.DB) (*gorm.DB, error)
}

type ExampleORMWithBeforeStrictUpdateSave

type ExampleORMWithBeforeStrictUpdateSave interface {
	BeforeStrictUpdateSave(context.Context, *gorm.DB) (*gorm.DB, error)
}

type ExampleWithAfterPatchSave

type ExampleWithAfterPatchSave interface {
	AfterPatchSave(context.Context, *Example, *field_mask.FieldMask, *gorm.DB) error
}

type ExampleWithAfterToORM

type ExampleWithAfterToORM interface {
	AfterToORM(context.Context, *ExampleORM) error
}

ExampleAfterToORM called after default ToORM code

type ExampleWithAfterToPB

type ExampleWithAfterToPB interface {
	AfterToPB(context.Context, *Example) error
}

ExampleAfterToPB called after default ToPB code

type ExampleWithBeforePatchApplyFieldMask

type ExampleWithBeforePatchApplyFieldMask interface {
	BeforePatchApplyFieldMask(context.Context, *Example, *field_mask.FieldMask, *gorm.DB) (*gorm.DB, error)
}

type ExampleWithBeforePatchRead

type ExampleWithBeforePatchRead interface {
	BeforePatchRead(context.Context, *Example, *field_mask.FieldMask, *gorm.DB) (*gorm.DB, error)
}

type ExampleWithBeforePatchSave

type ExampleWithBeforePatchSave interface {
	BeforePatchSave(context.Context, *Example, *field_mask.FieldMask, *gorm.DB) (*gorm.DB, error)
}

type ExampleWithBeforeToORM

type ExampleWithBeforeToORM interface {
	BeforeToORM(context.Context, *ExampleORM) error
}

ExampleBeforeToORM called before default ToORM code

type ExampleWithBeforeToPB

type ExampleWithBeforeToPB interface {
	BeforeToPB(context.Context, *Example) error
}

ExampleBeforeToPB called before default ToPB code

Jump to

Keyboard shortcuts

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