# sqlite3 /mod/etc/queue.db "select runtime from queue"
368.836
16.547
47.22
2.586
# jimsh
Welcome to Jim version 0.83
. package require sqlite3
1.0
. set db [sqlite3.open /mod/etc/queue.db]
::sqlite.handle4
. $db query {select runtime from queue}
{runtime 1.0} {runtime 1.0} {runtime 1.0} {runtime 1.0}
.
{runtime 0.0} for whatever reason.But the problem is in either the sqlite3 or jim package rather than webif but very strange that it only appears to affect this field, is it the only non-integer number field?Flamin' 'eck - there's always something to catch you out isn't there?
The data in the database appears to be correct:
But doing the same operation in jim gives this:Code:# sqlite3 /mod/etc/queue.db "select runtime from queue" 368.836 16.547 47.22 2.586
although sometimes it showsCode:# jimsh Welcome to Jim version 0.83 . package require sqlite3 1.0 . set db [sqlite3.open /mod/etc/queue.db] ::sqlite.handle4 . $db query {select runtime from queue} {runtime 1.0} {runtime 1.0} {runtime 1.0} {runtime 1.0} .{runtime 0.0}for whatever reason.
I haven't yet got any further.
Must be the former as that's what's changed.But the problem is in either the sqlite3 or jim package
It could be worked around in the Webif by converting to text (as jim doesn't care):rather than webif
. $db query {select cast(runtime as numeric) from queue limit 1}
{{cast(runtime as numeric)} 0.0}
. $db query {select cast(runtime as real) from queue limit 1}
{{cast(runtime as real)} 0.0}
. $db query {select cast(runtime as integer) from queue limit 1}
{{cast(runtime as integer)} 368}
. $db query {select cast(runtime as text) from queue limit 1}
{{cast(runtime as text)} 368.836}
. $db query {select cast(runtime as blob) from queue limit 1}
{{cast(runtime as blob)} 368.836}
. $db query {select cast(runtime as none) from queue limit 1}
{{cast(runtime as none)} 0.0}
The 1.0 only appears for the first query. Subsequent ones all generate 0.0.but very strange that it only appears to affect this field, is it the only non-integer number field?