zio-sql icon indicating copy to clipboard operation
zio-sql copied to clipboard

Add test for 'Position' function for PostgreSQL

Open jczuchnowski opened this issue 5 years ago • 3 comments

jczuchnowski avatar Nov 18 '20 22:11 jczuchnowski

I'd like to pick this one up

angelicarao avatar Nov 21 '20 12:11 angelicarao

I'm not sure the current definition is actually correct. A position function in PosgtreSQL looks like position(search_string in main_string). The definition currently in expr.scala is val Position = FunctionDef[(String, String), Int](FunctionName("position")) which generates a query looking like position(search_string, main_string) which is an invalid syntax. This is probably applicable for other functions ('substring', 'replace' for example). I think the parsing of these functions should be different, but I'm quite new to the library so I'm not sure where to begin. Any ideas @jczuchnowski ?

angelicarao avatar Nov 21 '20 13:11 angelicarao

This is still an open issue.

jczuchnowski avatar Feb 23 '22 20:02 jczuchnowski