lapis
lapis copied to clipboard
feature: manage multiple db
I can't find out a way to manage multiple db with lapis mysql model, So I add "options" parameter to "Model.extend" method, it looks like "_entity = Model:extend(default_options, "menus", { ....})"
The "default_options" is from "config.mysql", now I can change the options for my other db connection. To apply this feature, I must add options parameter to "
resty_mysql = function() ... local mysql = require("resty.mysql") return function(q, options) assert(type(options) == "table", "wrong options type: it must be a table!")" if logger then .... "
there is so much change to lapis source, so I wonder if the framework could supply this feature?