How to query Value?
-
I got a question, code like this
<md-input-container class="flex-auto" md-theme="default"> <label>Card Number</label> <input type="text" ng-model="logQuery.mifareCardID" ng-model-options="{ debounce: 300 }"> </md-input-container> <div flex></div> <md-input-container class="md-input-has-value flex-auto" md-theme="default"> <label for="StartTime">Start Time</label> <ma-date-picker type="text" ng-click="showPicker($event)" name="startTime" ng-model="logQuery.startTime" mode="date" id="StartTime" aria-invalid="false" md-theme="mangoDark"> </md-input-container> <md-input-container class="md-input-has-value flex-auto" md-theme="default" ng-if="logQuery.startTime"> <label for="EndTime">End Time</label> <ma-date-picker type="text" ng-click="showPicker($event)" name="endTime" ng-model="logQuery.endTime" mode="date" id="EndTime" aria-invalid="false" md-theme="mangoDark"> </md-input-container> <ma-now update-interval="1 SECONDS" output="time"></ma-now> <ma-point-query query="{$and: true, xid: '_Polling_accessCardID'}" points="doorAccessRecordPoints" /> <ma-get-point-value points="doorAccessRecordPoints"></ma-get-point-value> <ma-point-values points="doorAccessRecordPoints" values="doorAccessRecordPointsValues" from="resultLogQuery.startTime || dateBar.from" to="resultLogQuery.endTime || dateBar.to" rollup="POINT_DEFAULT" rollup-interval="time" use-cache="false"></ma-point-values>
doorAccessRecordPointsValues like this:
[ {"timestamp":1701400999162,"value_XID_Door02_Polling_accessCardID":2022010448}, {"timestamp":1701401016165,"value_XID_Door01_Polling_accessCardID":2022011364}, {"timestamp":1701401021166,"value_XID_Door05_Polling_accessCardID":2022012507}, {"timestamp":1701401065166,"value_XID_Door05_Polling_accessCardID":2022013115}, {"timestamp":1701401083162,"value_XID_Door04_Polling_accessCardID":2022010273}, {"timestamp":1701401085162,"value_XID_Door04_Polling_accessCardID":2022013232}, {"timestamp":1701401132166,"value_XID_Door05_Polling_accessCardID":2022010170}, {"timestamp":1701401179162,"value_XID_Door03_Polling_accessCardID":2022012796}, ]
I want to query value from use logQuery.mifareCardID to query doorAccessRecordPointsValues value is equal to logQuery.mifareCardID,
how do I do ? -
@sean You cannot query values per se, that's not the intended purpose of a time series DB.
One suggestion I have is generating values and filtering the output based upon the provided timeframe, the input field, and displaying those timestamps for those records entered.
The other is having a dedicated virtual datasource of virtual points whose Xids align with the accessCardID numbers and updating the corresponding datapoint everytime that accessCardID is entered into the system...Fox