lunarmodules / luasql

LuaSQL is a simple interface from Lua to a DBMS.
http://lunarmodules.github.io/luasql
539 stars 191 forks source link

tests/test.lua - "escape" test fails for ODBC driver #38

Closed jk77 closed 8 years ago

jk77 commented 8 years ago

Hello LuaSQL team,

The "escape" test in tests/test.lua fails when testing with the ODBC driver since "escape" is not defined in luaL_Reg connection_methods[] of create_metatables() in src/ls_odbc.c.

Since ODBC can be used to connect to a variety of different database types, I'm not sure what to suggest here. Perhaps change test.lua to verify that method 'escape' exists before trying to call CONN:escape, and pass the test with a "Not Implemented" message instead of "OK !"?

Regards jk77

tomasguisasola commented 8 years ago

Hi jk77

The "escape" test was not meant to be executed when testing the ODBC driver. Take a look at other drivers that do execute this test, such as Postgres or MySQL, and note that they explicitely add this test while ODBC don't.

Maybe you are forcing all the tests, don't you?

Regards, Tomás