You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Feature request: a proc exec() that does not auto-convert toDbValue
Sometimes it can be handy to do the toDbValue conversion by hand.
dbWriteStatement is of type Table[string, SqlStatement]
if dbWriteStatement.hasKey(topic):
if datatype[topic] == "float":
let data = parseFloat(payload).float64
dbWriteStatement[topic].exec(topic, data)
elif datatype[topic] == "integer":
let data = parseInt(payload).int64
dbWriteStatement[topic].exec(topic, data)
elif datatype[topic] == "string":
let data = payload
dbWriteStatement[topic].exec(topic, data)
versus:
if dbWriteStatement.hasKey(topic):
if datatype[topic] == "float":
let data = toDbValue(parseFloat(payload).float64)
elif datatype[topic] == "integer":
let data = toDbValue(parseInt(payload).int64)
elif datatype[topic] == "string":
let data = toDbValue(payload )
dbWriteStatement[topic].exec(topic, data)
The text was updated successfully, but these errors were encountered:
Feature request: a
proc exec()
that does not auto-convert toDbValueSometimes it can be handy to do the toDbValue conversion by hand.
dbWriteStatement
is of typeTable[string, SqlStatement]
versus:
The text was updated successfully, but these errors were encountered: