Those are great questions/ideas. I've been meaning to implement prepared statements for a while now, so I should probably just hunker down and do it as it's not that difficult. Having an escape function of sorts would be interesting as well. Feel free to open an issue on the repo and we can push things forward.
https://github.com/quinnj/ODBC.jl/issues -Jacob On Thu, Feb 19, 2015 at 11:39 AM, Philip Tellis <[email protected]> wrote: > I'm using the ODBC package to connect to a database and make a few SQL > queries. For some of these queries, the table name or values in the WHERE > clause come from variables, and I need a way to safely quote them for use > in an SQL string. > > Is there a standard method in Julia to do this? > > For values in the WHERE clause, prepared statements would be useful, but I > couldn't find a way to do this with ODBC. > > For table names, a simple sql escape function would help (one that was > database character set aware). Something similar to PHP's > mysqli_real_escape_string: > http://php.net/manual/en/mysqli.real-escape-string.php > > Does Julia have either of these methods? > > Thanks, > > Philip >
