Documentation ¶
Index ¶
- Constants
- func ToEventData(db map[string]any) *msgThing.EventData
- func ToPropertyData(id string, db map[string]any) *msgThing.PropertyData
- type SchemaDataRepo
- func (d *SchemaDataRepo) GenInsertPropertySql(ctx context.Context, t *schema.Model, productID string, deviceName string, ...) (sql string, args []any, err error)
- func (d *SchemaDataRepo) GenSql(sql ...string) string
- func (d *SchemaDataRepo) GetEventCountByFilter(ctx context.Context, filter msgThing.FilterOpt) (int64, error)
- func (d *SchemaDataRepo) GetEventDataByFilter(ctx context.Context, filter msgThing.FilterOpt) ([]*msgThing.EventData, error)
- func (d *SchemaDataRepo) GetLatestPropertyDataByID(ctx context.Context, filter msgThing.LatestFilter) (*msgThing.PropertyData, error)
- func (d *SchemaDataRepo) GetPropertyCountByID(ctx context.Context, filter msgThing.FilterOpt) (int64, error)
- func (d *SchemaDataRepo) GetPropertyDataByID(ctx context.Context, filter msgThing.FilterOpt) ([]*msgThing.PropertyData, error)
- func (d *SchemaDataRepo) InsertEventData(ctx context.Context, productID string, deviceName string, ...) error
- func (d *SchemaDataRepo) InsertPropertiesData(ctx context.Context, t *schema.Model, productID string, deviceName string, ...) error
- func (d *SchemaDataRepo) InsertPropertyData(ctx context.Context, t *schema.Model, productID string, deviceName string, ...) error
Constants ¶
View Source
const (
PROPERTY_TYPE = "property_type"
)
Variables ¶
This section is empty.
Functions ¶
func ToPropertyData ¶
func ToPropertyData(id string, db map[string]any) *msgThing.PropertyData
Types ¶
type SchemaDataRepo ¶
type SchemaDataRepo struct { stores.SchemaStore // contains filtered or unexported fields }
func NewSchemaDataRepo ¶
func NewSchemaDataRepo(dataSource string, getSchemaModel schema.GetSchemaModel, kv kv.Store) *SchemaDataRepo
func (*SchemaDataRepo) GenInsertPropertySql ¶ added in v0.6.0
func (*SchemaDataRepo) GenSql ¶ added in v0.6.0
func (d *SchemaDataRepo) GenSql(sql ...string) string
func (*SchemaDataRepo) GetEventCountByFilter ¶
func (*SchemaDataRepo) GetEventDataByFilter ¶
func (*SchemaDataRepo) GetLatestPropertyDataByID ¶ added in v0.4.1
func (d *SchemaDataRepo) GetLatestPropertyDataByID(ctx context.Context, filter msgThing.LatestFilter) (*msgThing.PropertyData, error)
func (*SchemaDataRepo) GetPropertyCountByID ¶
func (*SchemaDataRepo) GetPropertyDataByID ¶
func (d *SchemaDataRepo) GetPropertyDataByID( ctx context.Context, filter msgThing.FilterOpt) ([]*msgThing.PropertyData, error)
func (*SchemaDataRepo) InsertEventData ¶
func (*SchemaDataRepo) InsertPropertiesData ¶
func (*SchemaDataRepo) InsertPropertyData ¶
func (d *SchemaDataRepo) InsertPropertyData(ctx context.Context, t *schema.Model, productID string, deviceName string, property *msgThing.PropertyData) error
Click to show internal directories.
Click to hide internal directories.