mwild1 / luadbi

Multi-backend SQL database library for Lua
MIT License
38 stars 14 forks source link

Add ODBC driver #33

Closed moteus closed 6 years ago

moteus commented 8 years ago

I write ODBC driver for DBI library based on my Lua-ODBC library. I slitly change tests:

  1. I use select cast(? as <TYPE>) as retval to test type encodings.
  2. I found that ODBC drivers for MySQL/PgSQL does not get any error when call prepare with invalid SQL. So I also try call execute.
  3. I do not call test for returning id because MySQL does not support it.

For now I add DBI.lua to my repo because I want run tests on Travis. But I will not add this to luarocks. I add it only after you change main luadbi module so it can load ODBC driver. So i can just add luadbi as deps to my module.

PS. I also add some tests to fetch, close, tostring and execute same statement with different query multiple times

sparked435 commented 6 years ago

DBI.lua now checks for driver 'ODBC' as dbdodbc as well.

moteus commented 6 years ago

Just tested my ODBC driver with v0.6. All works. Add module to luarocks.