Versions in this module Expand all Collapse all v0 v0.10.7 Oct 9, 2024 v0.10.6 Oct 6, 2024 Changes in this version + const PropertyType + func GetArrayID(id string, num int) string + func ToEventData(db map[string]any) *msgThing.EventData + func ToPropertyData(id string, p *schema.Property, db map[string]any) *msgThing.PropertyData + type DeviceDataRepo struct + func NewDeviceDataRepo(dataSource conf.TSDB, getSchemaModel schema.GetSchemaModel, kv kv.Store) *DeviceDataRepo + func (d *DeviceDataRepo) CreateProperty(ctx context.Context, p *schema.Property, productID string) error + func (d *DeviceDataRepo) DeleteDevice(ctx context.Context, t *schema.Model, productID string, deviceName string) error + func (d *DeviceDataRepo) DeleteProduct(ctx context.Context, t *schema.Model, productID string) error + func (d *DeviceDataRepo) DeleteProperty(ctx context.Context, p *schema.Property, productID string, identifier string) error + func (d *DeviceDataRepo) GenInsertPropertySql(ctx context.Context, p *schema.Property, productID string, deviceName string, ...) (sql string, args []any, err error) + func (d *DeviceDataRepo) GetEventCountByFilter(ctx context.Context, filter msgThing.FilterOpt) (int64, error) + func (d *DeviceDataRepo) GetEventDataByFilter(ctx context.Context, filter msgThing.FilterOpt) ([]*msgThing.EventData, error) + func (d *DeviceDataRepo) GetLatestPropertyDataByID(ctx context.Context, p *schema.Property, filter msgThing.LatestFilter) (*msgThing.PropertyData, error) + func (d *DeviceDataRepo) GetPropertyCountByID(ctx context.Context, p *schema.Property, filter msgThing.FilterOpt) (int64, error) + func (d *DeviceDataRepo) GetPropertyDataByID(ctx context.Context, p *schema.Property, filter msgThing.FilterOpt) ([]*msgThing.PropertyData, error) + func (d *DeviceDataRepo) InitDevice(ctx context.Context, t *schema.Model, productID string, deviceName string) error + func (d *DeviceDataRepo) InitProduct(ctx context.Context, t *schema.Model, productID string) error + func (d *DeviceDataRepo) InsertEventData(ctx context.Context, productID string, deviceName string, ...) error + func (d *DeviceDataRepo) InsertPropertiesData(ctx context.Context, t *schema.Model, productID string, deviceName string, ...) error + func (d *DeviceDataRepo) InsertPropertyData(ctx context.Context, t *schema.Property, productID string, deviceName string, ...) error + func (d *DeviceDataRepo) UpdateProduct(ctx context.Context, oldT *schema.Model, newt *schema.Model, productID string) error + func (d *DeviceDataRepo) UpdateProperty(ctx context.Context, oldP *schema.Property, newP *schema.Property, ...) error + type SchemaStore struct + func (S *SchemaStore) GetEventStableName() string + func (S *SchemaStore) GetEventTableName(productID, deviceName string) string + func (S *SchemaStore) GetPropertyStableName(tag schema.Tag, productID, identifier string) string + func (S *SchemaStore) GetPropertyTableName(productID, deviceName, identifier string) string + func (S *SchemaStore) GetPropertyTableNames(productID, deviceName string, p *schema.Property) (ret []string) + func (S *SchemaStore) GetSpecsColumnWithArgFunc(s schema.Specs, argFunc string) string + func (S *SchemaStore) GetSpecsCreateColumn(s schema.Specs) string + func (S *SchemaStore) GetStableNameList(t *schema.Model, productID string) (tables []string) + func (S *SchemaStore) GetTableNameList(t *schema.Model, productID string, deviceName string) (tables []string)