Add. Support multiple database backends.

```Lua
local Database = require 'resources.functions.database'

-- Default backend configured via xml_handler.db_backend = 'native'
dbh = Database.new("system")

-- To use other backends you can use
dbh = Database.backend.luasql("system")
```
This commit is contained in:
Alexey Melnichuk
2016-02-19 17:03:45 +03:00
parent 80758e8826
commit 5afec68fb1
7 changed files with 493 additions and 156 deletions

View File

@@ -0,0 +1,12 @@
local Cache = require 'resources.functions.cache'
local Database = require 'resources.functions.database'
Database.__self_test__({
"native",
"luasql",
"odbc",
"odbcpool",
},
"system")
Cache._self_test()