purescript-selda
purescript-selda copied to clipboard
Mysql Support
is there any plan for supporting MySQL? I read your thesis paper and read most of the source code, I think it should not be hard to add MySQL too. I'm up for the task if you have any concern let me know.
I think adding MySQL should be possible, hopefully without changing the general backend-agnostic part of the code.
Ideally MySQL and other backends should be separate purescript packages e.g. purescript-selda-mysql
, would you mind implementing it that way?
@paluh do you have some comments on that?
the main problem for a separate purescript package is how should I add litMysql
for example, in instance chaining.
Lit
typeclass is pure optional convenience - just provide litMySQL
similar to litPG
and ignore adding it to Lit
.
The problem with this extensibility just proves that current solution is not ideal, because lit
handles both backend-agnostic literals like String
, Int
, but also backend-specific ones which requires the instance chain.
Anyway, there are solutions to this problem, like splitting Lit
into two separate type classes, but we would need more time to discuss these design changes.
I'm in the middle of supporting MySql for selda right now the issue that when creating query the column names are surrounded with "
and MySql cannot parse this columns if I remove the "
from this function
https://github.com/Kamirus/purescript-selda/blob/e2c56b046d88d4c9462a1a7eb177c05de502ce47/src/Selda/Table.purs#L106
everything works
Would setting ANSI_QUOTES resolve this problem without changing showColumnName
?