Alecaddd / sequeler

SQL Client built in Vala
GNU General Public License v3.0
801 stars 66 forks source link

Function CAST does not exist #363

Open StuTheBearded opened 2 years ago

StuTheBearded commented 2 years ago

So I decided to use CAST in a query Sequeler is claiming it doesn't exist, this is clearly wrong. Cast is a perfectly valid function in MySQL/MariaDB and many others.

To reproduce simply add a cast to ones query the one below will do it, connect to a mysql/mariadb database. To get the error that is the title of this bug don't select a database, MySQL/MariaDB will execute it without needing one.

SELECT CAST(now() AS DATE);

If you have selected a database you'll get the following error which is also wrong:

Incorrect parameters in the call to stored function 'CAST'