Documentation
¶
Index ¶
- func ArrayToSql[arrType any](arr []arrType) (sql string)
- func GenParams(params map[string]any) (string, string, []any, error)
- func GetCommonConn(in any) *gorm.DB
- func GetTdType(define schema.Define) string
- func GetTenantConn(in any) *gorm.DB
- func InitConn(database conf.Database)
- func Scan(rows *sql.Rows, Dest any) error
- type HubLogStore
- type Int64Arr
- type Point
- type SDKLogStore
- type SchemaStore
- func (S *SchemaStore) GetEventStableName() string
- func (S *SchemaStore) GetEventTableName(productID, deviceName string) string
- func (S *SchemaStore) GetPropertyStableName(productID, identifier string) string
- func (S *SchemaStore) GetPropertyTableName(productID, deviceName, identifier string) 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)
- type Time
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ArrayToSql ¶
func GetCommonConn ¶ added in v0.5.1
获取公共连接 传入context或db连接 如果传入的是db连接则直接返回db
func GetTenantConn ¶ added in v0.5.1
获取租户连接 传入context或db连接 如果传入的是db连接则直接返回db
Types ¶
type HubLogStore ¶
type HubLogStore struct { }
func (*HubLogStore) GetLogStableName ¶
func (h *HubLogStore) GetLogStableName() string
func (*HubLogStore) GetLogTableName ¶
func (h *HubLogStore) GetLogTableName(productID, deviceName string) string
type Point ¶ added in v0.5.1
type Point struct { Longitude float64 `json:"longitude,range=[0:180]"` //经度 Latitude float64 `json:"latitude,range=[0:90]"` //纬度 }
type SDKLogStore ¶
type SDKLogStore struct { }
func (*SDKLogStore) GetSDKLogStableName ¶
func (s *SDKLogStore) GetSDKLogStableName() string
func (*SDKLogStore) GetSDKLogTableName ¶
func (s *SDKLogStore) GetSDKLogTableName(productID, deviceName string) string
type SchemaStore ¶
type SchemaStore struct { }
func (*SchemaStore) GetEventStableName ¶
func (S *SchemaStore) GetEventStableName() string
func (*SchemaStore) GetEventTableName ¶
func (S *SchemaStore) GetEventTableName(productID, deviceName string) string
func (*SchemaStore) GetPropertyStableName ¶
func (S *SchemaStore) GetPropertyStableName(productID, identifier string) string
func (*SchemaStore) GetPropertyTableName ¶
func (S *SchemaStore) GetPropertyTableName(productID, deviceName, identifier string) string
func (*SchemaStore) GetSpecsColumnWithArgFunc ¶
func (S *SchemaStore) GetSpecsColumnWithArgFunc(s schema.Specs, argFunc string) string
func (*SchemaStore) GetSpecsCreateColumn ¶
func (S *SchemaStore) GetSpecsCreateColumn(s schema.Specs) string
func (*SchemaStore) GetStableNameList ¶
func (S *SchemaStore) GetStableNameList( t *schema.Model, productID string) (tables []string)
func (*SchemaStore) GetTableNameList ¶
Click to show internal directories.
Click to hide internal directories.