sqlx
sqlx copied to clipboard
[MySQL] Can't get by column name when calling stored procedure
Hi
When calling a stored procedure, i can't retrieve column by name :
sqlx::query("call fetch()").map(|row: MySqlRow| {
row.get("id")
}).fetch_all(&pool)
is not working, and with debugger i can see row.column_names is empty
but get by index works
sqlx::query("call fetch()").map(|row: MySqlRow| {
row.get(0)
}).fetch_all(&pool)
Stored procedure looks like
DELIMITER $$
drop procedure if exists fetch_n;
CREATE PROCEDURE fetch_n()
BEGIN
select id from records;
END
$$
Best regards
I'm also facing the same issue, did you got any update meantime?