Closed yooniversal closed 1 year ago
I omitted some codes that must be called SessionDataSet.Next()
before calling SessionDataSet.GetText()
(or SessionDataSet.GetValue()
, ...).
After adding some codes in session_example.go, GetText()
and GetValue()
return expected value.
I have implemented that change default DB of edgeX project as IoTDB working on docker, but there are some issues when use GET method when I call it on edgeX. IoTDB session is connected successfully with DB client of the project.
Description
I'm following
printDataSet0()
andinsertRecord()
implemented in session_example.go.Although
Session.InsertRecord()
works successfully that returns no error and I can check input data in IoTDB (referenced here for testing it work as typing SQL in IoTDB), cannot retrieve the data in edgeX when useSession.ExecuteQueryStatement(sql)
perfectly. More details,ExecuteQueryStatement()
returnsSessionDataSet
without error but when useSessionDataSet.GetText()
, it returns""
always but not input data saved in IoTDB.Use
InsertRecord()
inAddEvent()
: code here andGetText()
inChangeTypeToEvent()
: code hereexecute SQL in IoTDB:
empty string returned from IoTDB in edgeX API response: (deviceId:
root.sg27
, measurement:deviceName
, value:root
)While I use
getText()
, makeisNull()
in the function not working because returnsfalse
:len(s.values)
is updated (equal with expected value) but it has no valueSessionDataSet.GetColumnCount()
is updated too and equals with expected valueisNull()
is activated, then error occured:runtime error: negative shift amount
isNull()
's parameterscolumnIndex
=0,rowsIndex
=0 So inisNull()
, parameterrowsIndex
has -1 which makes the error because shift operation must be used with non-negative valueQuestion
columnIndex
androwsIndex
must be updated whenever POST event occurs. ButrowsIndex
is not. Is there any reason why not update it?ExecuteQueryStatement()
? (orExecuteStatement()
orExecuteRawDataQuery()
whatever)If you think reason is different, please share.
Environment