[sql] Select the sql column datatype Decimal is not support.
I request as
select price from room
Here's my db table:
Result:
Thanks for the report! Are we talking about sqlite, mysql or postgresql?
for my situation, I just using mysql.
Ah i think i remember. Since DECIMAL can't (or shouldn't) be converted to f64 i wasn't sure how to best send it to the js side so i just left it out for later. Still don't know any better (i never use sql myself) so this probably has to wait for the plugin's partial rewrite.
Noted with Thanks
change the type by sql.
for example:
SELECT CAST(id AS SIGNED) as id FROM table
To follow up on what @Tenodec said, it worked for me casting the decimal value as CHAR, otherwise it rounds the value in certain scenarios.
For example:
SELECT CAST(price AS CHAR) as price FROM table
I also got this error, but in postgresql. There are some other types that are unsupported like arrays, real, decimal
Will the plugin partial rewrite add support for more types both in postgresql and in mysql?
Will the plugin partial rewrite add support for more types both in postgresql and in mysql?
Not necessarily, no. This is not the goal of the rewrite and type support can be added before/after the rewrite (this part of the code shouldn't change much in the rewrite). A large part of the rewrite already happened but i forgot about this issue.