data

package
v0.0.0-...-ae06870 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2020 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AttributeToPb

func AttributeToPb(d Attribute) *pbsemantic.AttributeData

func MustUserId

func MustUserId(d Attribute, uid uint64) error

Types

type Attribute

type Attribute interface {
	storeql.Storable

	GetSchemaId() uint64
	SetSchemaId(uint64)

	GetUserId() uint64
	SetUserId(uint64)

	GetValue() value.Value
	SetValue(interface{}) error
}

type ProductAttributeData

type ProductAttributeData struct {
	Id       uint64 `json:"id,omitempty"`
	SchemaId uint64 `json:"schema_id,omitempty"`
	UserId   uint64 `json:"user_id,omitempty"`

	EntityId    uint64 `json:"entity_id,omitempty"`
	EntityTable string `json:"entity_table,omitempty"`

	BoolValue    *value.Bool    `json:"bool_value,omitempty"`
	StringValue  *value.String  `json:"string_value,omitempty"`
	Int64Value   *value.Int64   `json:"int_64_value,omitempty"`
	Float64Value *value.Float64 `json:"float_64_value,omitempty"`

	SlStringValue  *value.SlString  `json:"sl_string_value,omitempty"`
	SlInt64Value   *value.SlInt64   `json:"sl_int_64_value,omitempty"`
	SlFloat64Value *value.SlFloat64 `json:"sl_float_64_value,omitempty"`
	// contains filtered or unexported fields
}

func FindProductAttributeData

func FindProductAttributeData(ctx context.Context, db *sqlx.DB, id uint64) (*ProductAttributeData, error)

func FindProductAttributeDataByMatch

func FindProductAttributeDataByMatch(ctx context.Context, db *sqlx.DB, schemaId uint64, entity *pbshared.Entity) (*ProductAttributeData, error)

func FindProductAttributeDatasByMatch

func FindProductAttributeDatasByMatch(ctx context.Context, db *sqlx.DB, entity *pbshared.Entity) ([]*ProductAttributeData, error)

func NewProductAttributeData

func NewProductAttributeData(t value.Type) (*ProductAttributeData, error)

func (*ProductAttributeData) Clone

func (*ProductAttributeData) GetId

func (sp *ProductAttributeData) GetId() uint64

func (*ProductAttributeData) GetSchemaId

func (pc *ProductAttributeData) GetSchemaId() uint64

func (*ProductAttributeData) GetUserId

func (pc *ProductAttributeData) GetUserId() uint64

func (*ProductAttributeData) GetValue

func (pc *ProductAttributeData) GetValue() value.Value

func (*ProductAttributeData) SQLMap

func (sp *ProductAttributeData) SQLMap() map[string]driver.Value

func (*ProductAttributeData) SQLTable

func (sp *ProductAttributeData) SQLTable() string

func (*ProductAttributeData) SetId

func (sp *ProductAttributeData) SetId(id uint64)

func (*ProductAttributeData) SetSchemaId

func (pc *ProductAttributeData) SetSchemaId(i uint64)

func (*ProductAttributeData) SetUserId

func (pc *ProductAttributeData) SetUserId(i uint64)

func (*ProductAttributeData) SetValue

func (pc *ProductAttributeData) SetValue(v interface{}) error

type ServiceProviderAttributeData

type ServiceProviderAttributeData struct {
	Id       uint64 `json:"id,omitempty"`
	SchemaId uint64 `json:"schema_id,omitempty"`
	UserId   uint64 `json:"user_id,omitempty"`

	EntityId    uint64 `json:"entity_id,omitempty"`
	EntityTable string `json:"entity_table,omitempty"`

	BoolValue    *value.Bool    `json:"bool_value,omitempty"`
	StringValue  *value.String  `json:"string_value,omitempty"`
	Int64Value   *value.Int64   `json:"int_64_value,omitempty"`
	Float64Value *value.Float64 `json:"float_64_value,omitempty"`

	SlStringValue  *value.SlString  `json:"sl_string_value,omitempty"`
	SlInt64Value   *value.SlInt64   `json:"sl_int_64_value,omitempty"`
	SlFloat64Value *value.SlFloat64 `json:"sl_float_64_value,omitempty"`
}

func FindServiceProviderAttributeData

func FindServiceProviderAttributeData(ctx context.Context, db *sqlx.DB, id uint64) (*ServiceProviderAttributeData, error)

func FindServiceProviderAttributeDataByMatch

func FindServiceProviderAttributeDataByMatch(ctx context.Context, db *sqlx.DB, schemaId uint64, entity *pbshared.Entity) (*ServiceProviderAttributeData, error)

func FindServiceProviderAttributeDatasByMatch

func FindServiceProviderAttributeDatasByMatch(ctx context.Context, db *sqlx.DB, entity *pbshared.Entity) ([]*ServiceProviderAttributeData, error)

func NewServiceProviderAttributeData

func NewServiceProviderAttributeData(t value.Type) (*ServiceProviderAttributeData, error)

func (*ServiceProviderAttributeData) GetId

func (*ServiceProviderAttributeData) GetSchemaId

func (pc *ServiceProviderAttributeData) GetSchemaId() uint64

func (*ServiceProviderAttributeData) GetUserId

func (pc *ServiceProviderAttributeData) GetUserId() uint64

func (*ServiceProviderAttributeData) GetValue

func (pc *ServiceProviderAttributeData) GetValue() value.Value

func (*ServiceProviderAttributeData) SQLMap

func (*ServiceProviderAttributeData) SQLTable

func (sp *ServiceProviderAttributeData) SQLTable() string

func (*ServiceProviderAttributeData) SetId

func (sp *ServiceProviderAttributeData) SetId(id uint64)

func (*ServiceProviderAttributeData) SetSchemaId

func (pc *ServiceProviderAttributeData) SetSchemaId(i uint64)

func (*ServiceProviderAttributeData) SetUserId

func (pc *ServiceProviderAttributeData) SetUserId(i uint64)

func (*ServiceProviderAttributeData) SetValue

func (pc *ServiceProviderAttributeData) SetValue(v interface{}) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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