Implementation of ROW_NUMBER
First thing first, this is beautiful tool, good job ! And thanks a lot !! 💪
To summarize I would like to use ROW_NUMBER in queries
- I tried
registerFunctionbut how to get the current index ? Maybe we could expose some informations as argument throughimplementationcall - An other suggestion is we could add this psql function at the lower level in the lib ?
It could be use like this in the playground
-- ROW_NUMBER()
SELECT "user"."id" AS "user_id", "user"."name" AS "user_name", ROW_NUMBER() OVER (ORDER BY "id") FROM "user";
what do you think ?
thank you again Rémi
Hi Rémi, Thanks !
Ouch... that not a simple function, so registerFunction() is not the right call here. This is quite tricky to implement. I dont have time to implement this right now unfortunately, but I'm adding that to my todolist, and I'll think about it.
Any updates on this, or any workarounds I could try? 😀
would really love to have support for ROW_NUMBER someday
currently we have some test cases that we xdescribe out and only run locally because we need to connect to a live running db instance
+1 to this request. Having support for ROW_NUMBER would help alot ! 🤞