|
|
@ -68,6 +68,7 @@ func (r *DeviceRepo) FetchByReference(ctx context.Context, kind models.Reference |
|
|
|
case models.RKBridgeID: |
|
|
|
q = q.Where(sq.Eq{"bridge_id": strings.Split(value, ",")}) |
|
|
|
case models.RKName: |
|
|
|
value = strings.ReplaceAll(value, "*", "%") |
|
|
|
q = q.Where(sq.Like{"name": value}) |
|
|
|
case models.RKTag: |
|
|
|
allTags := strings.Split(strings.ReplaceAll(strings.ReplaceAll(value, "-", ",-"), "+", ",+"), ",") |
|
|
|