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
I am accessing a MySQL and MariaDB database using Rust with SeaORM, and my query includes the RANK() window function.
In MySQL, I can fetch the rank column value using u32 (unsigned integer),
In MariaDB, this does not work. I have to use i32 (signed integer) instead.
Here’s an example query:
SELECT RANK() OVER (ORDER BY some_column DESC) AS rank_value
FROM some_table;
How can I find out the exact return type of RANK() in MySQL and MariaDB? Is there any SQL command by which I can see and confirm it myself? How can handle this different return type in Rust with SeaORM?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I am accessing a MySQL and MariaDB database using Rust with SeaORM, and my query includes the
RANK()window function.In MySQL, I can fetch the
rankcolumn value usingu32(unsigned integer),In MariaDB, this does not work. I have to use
i32(signed integer) instead.Here’s an example query:
How can I find out the exact return type of
RANK()in MySQL and MariaDB? Is there any SQL command by which I can see and confirm it myself? How can handle this different return type in Rust with SeaORM?Beta Was this translation helpful? Give feedback.
All reactions