Descriptive Problem Summary:
BYOND's Dantom.DB library fails to retrieve "data type" information for the columns it returns. Not only that, it does not seem to be converting the returned values into the proper format and just leaves it as text (where as it could contain a number for example).
Numbered Steps to Reproduce Problem:
Simply request some data from a database. It won't retrieve the sql_type at all, nor does it convert the integer values properly (it's all text).
I've taken the liberty of creating a demonstration project to show the problems.
You can find it here.
(another note. it seems to be setting the table value to the column's name. and I think the length values are a little off as well)
Expected Results:
It'd retrieve the given information along with converting the value of the column to its proper data type.
Actual Results:
It does neither.
Does the problem occur:
Every time? Or how often? Every time.
In other games? Yes.
On other computers? Yes.
In other user accounts? Yes.
When does the problem NOT occur?
Never.
Workarounds:
Some method of determining if the value should be considered a string or an integer.
ID:64135
Apr 17 2009, 11:51 am
|
|||||||||||||||||
Resolved
| |||||||||||||||||
Note: table data is always returned in text format, but you can test the returned 'flags' parameter to see if it should be treated as a number:
var/isnum = (column.flags&IS_NUMERIC)!=0 We could update Dantom.DB to do this conversion before returning the result; however, it would incur extra overhead per query, to grab the flags. |
There are a couple of workaround options here, so we'll look into those.