is there a way to avoid the "as" when building a "from" clause: "from =
mytable as T1"?
Oracle, through ODBC, seems not to like it, giving something like "sql =
command unproperly terminated"
I found it in Sql.hs. I guess that I could make a little change and =
recompile, just to keep on testing HaskellDB on my project
More generally, I believe that an sql wrapper should consider the =
different db syntaxes. This is a common topic to other wrappers too.
Santoemma Enrico wrote:
> is there a way to avoid the "as" when building a "from" clause: "from
> mytable as T1"? Oracle, through ODBC, seems not to like it, giving
> something like "sql command unproperly terminated"
Well, there is no way to avoid it in the current version. You could of=20
course try to hack it yourself. However, you might get into trouble if=20
the resulting query uses the same table twice.
There is a known bug with table aliases when using union:
But it doesn't seem like AS would cause an error like that, could it be=20
something else in the query? Did you try using showSql to see the SQL=20
query? Does Oracle not allow table aliases?
> More generally, I believe that an sql wrapper should consider the
> different db syntaxes. This is a common topic to other wrappers too.=20
Yes, this has been discussed before, and it seems most people agree that=20
it would be useful to tailor the SQL generation to the particular RDBMS=20
being used. This can be tricky with ODBC, since HaskellDB will have=20
trouble figuring out which RDBMS it is talking too. But maybe this could=20
just be another parameter to the connect function.
Another related topic is implementing non-SQL backends, which would be=20
interesting if not just to see how general HaskellDB really is.
Get latest updates about Open Source Projects, Conferences and News.