From cfdf248d8bc807728bff7285d67bd10ba5cb9763 Mon Sep 17 00:00:00 2001 From: Remy Marquis Date: Sun, 6 Dec 2015 17:48:05 +0100 Subject: [PATCH] libs: updated to latest LuaSQL --- luasql/README | 16 ++++------------ luasql/tests/firebird.lua | 2 ++ luasql/tests/mysql.lua | 2 ++ luasql/tests/odbc.lua | 2 +- luasql/tests/postgres.lua | 2 ++ luasql/tests/sqlite.lua | 5 ++++- luasql/tests/sqlite3.lua | 5 ++++- luasql/tests/test.lua | 2 +- 8 files changed, 20 insertions(+), 16 deletions(-) diff --git a/luasql/README b/luasql/README index 034c7f65..c85d958d 100644 --- a/luasql/README +++ b/luasql/README @@ -1,22 +1,14 @@ -LuaSQL 2.1 - This is a copy of commit/9ddfc9fb1c1ccdd204c059197724ac1f08e5a1be https://github.com/keplerproject/luasql - -http://www.keplerproject.org/luasql/ +LuaSQL - This is a copy of commit/6485f4845ce955bb9d5227cdba12aa90dd241f70 +http://keplerproject.github.io/luasql/doc/us/ LuaSQL is a simple interface from Lua to a DBMS. It enables a Lua program to: - * Connect to ODBC, ADO, Oracle, MySQL, SQLite and PostgreSQL databases; + * Connect to ODBC, ADO, Oracle, MySQL, SQLite, Firebird and PostgreSQL databases; * Execute arbitrary SQL statements; * Retrieve results in a row-by-row cursor fashion. LuaSQL is free software and uses the same license as Lua 5.1. -Source code for LuaSQL can be downloaded from the LuaForge page. - -If you are using LuaBinaries a Windows binary version of LuaSQL can be found at the same LuaForge page. - -LuaSQL 2.1.1 [29/Oct/2007] -* Fixed a bug in the SQLite3 error handling (patch by David Burgess) -* Fixed bug [#1834] for SQLite 3 (found by Savin Zlobec, patch by Marc Nijdam) -* Fixed bug [#1770] for SQLite 3 (found by Enrico Tassi, patch by Marc Nijdam) +Source code for LuaSQL can be downloaded from its GitHub repository. diff --git a/luasql/tests/firebird.lua b/luasql/tests/firebird.lua index ca15865a..d8e4f689 100644 --- a/luasql/tests/firebird.lua +++ b/luasql/tests/firebird.lua @@ -19,3 +19,5 @@ function drop_table () CONN:commit() end +table.insert (CONN_METHODS, "escape") +table.insert (EXTENSIONS, escape) diff --git a/luasql/tests/mysql.lua b/luasql/tests/mysql.lua index e886dbb8..3e73afa4 100644 --- a/luasql/tests/mysql.lua +++ b/luasql/tests/mysql.lua @@ -7,6 +7,8 @@ QUERYING_STRING_TYPE_NAME = "binary(65535)" table.insert (CUR_METHODS, "numrows") table.insert (EXTENSIONS, numrows) +table.insert (CONN_METHODS, "escape") +table.insert (EXTENSIONS, escape) --------------------------------------------------------------------- -- Build SQL command to create the test table. diff --git a/luasql/tests/odbc.lua b/luasql/tests/odbc.lua index bf979cbb..5e2a36b7 100644 --- a/luasql/tests/odbc.lua +++ b/luasql/tests/odbc.lua @@ -27,5 +27,5 @@ table.insert (EXTENSIONS, function () assert2 (true, row.f3, "Wrong bit representation") -- Drops the table - assert2 (DROP_TABLE_RETURN_VALUE0, CONN:execute("drop table test_dt") ) + assert2 (DROP_TABLE_RETURN_VALUE, CONN:execute("drop table test_dt") ) end) diff --git a/luasql/tests/postgres.lua b/luasql/tests/postgres.lua index 281388bd..52dc5069 100644 --- a/luasql/tests/postgres.lua +++ b/luasql/tests/postgres.lua @@ -5,3 +5,5 @@ table.insert (CUR_METHODS, "numrows") table.insert (EXTENSIONS, numrows) +table.insert (CONN_METHODS, "escape") +table.insert (EXTENSIONS, escape) diff --git a/luasql/tests/sqlite.lua b/luasql/tests/sqlite.lua index f45cc7c2..6009ad44 100644 --- a/luasql/tests/sqlite.lua +++ b/luasql/tests/sqlite.lua @@ -14,4 +14,7 @@ end function checkUnknownDatabase(ENV) -- skip this test -end \ No newline at end of file +end + +table.insert (CONN_METHODS, "escape") +table.insert (EXTENSIONS, escape) diff --git a/luasql/tests/sqlite3.lua b/luasql/tests/sqlite3.lua index 1da81baa..1773cf14 100644 --- a/luasql/tests/sqlite3.lua +++ b/luasql/tests/sqlite3.lua @@ -16,4 +16,7 @@ end function checkUnknownDatabase(ENV) -- skip this test -end \ No newline at end of file +end + +table.insert (CONN_METHODS, "escape") +table.insert (EXTENSIONS, escape) diff --git a/luasql/tests/test.lua b/luasql/tests/test.lua index 0531cc42..ae2d653a 100644 --- a/luasql/tests/test.lua +++ b/luasql/tests/test.lua @@ -499,6 +499,7 @@ end function escape () local escaped = CONN:escape"a'b'c'd" assert ("a\\'b\\'c\\'d" == escaped or "a''b''c''d" == escaped) + io.write (" escape") end --------------------------------------------------------------------- @@ -644,7 +645,6 @@ tests = { { "fetch many", fetch_many }, { "rollback", rollback }, { "get column information", column_info }, - { "escape", escape }, { "extensions", extensions_test }, { "close objects", check_close }, { "drop table", drop_table },