mirror of
https://github.com/luapower/mysql.git
synced 2025-02-08 16:20:31 +01:00
unimportant
This commit is contained in:
parent
3a8130b35b
commit
b0e0288c09
@ -1204,12 +1204,23 @@ local function query(self, sql, opt)
|
|||||||
end
|
end
|
||||||
conn.query = protect(query)
|
conn.query = protect(query)
|
||||||
|
|
||||||
function get_collation(self)
|
--[[local]] function get_collation(self)
|
||||||
local t = query(self, 'select @@collation_connection cl, @@character_set_connection cs')[1]
|
local t = query(self, 'select @@collation_connection cl, @@character_set_connection cs')[1]
|
||||||
return t.cl, t.cs
|
return t.cl, t.cs
|
||||||
end
|
end
|
||||||
conn.get_collation = protect(get_collation)
|
conn.get_collation = protect(get_collation)
|
||||||
|
|
||||||
|
do
|
||||||
|
local function pass(self, ret, ...)
|
||||||
|
if not ret then return nil, ... end
|
||||||
|
self.schema = schema
|
||||||
|
return ret, ...
|
||||||
|
end
|
||||||
|
function conn:use(schema)
|
||||||
|
return pass(self, self:query('use `' .. schema .. '`'))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
local stmt = {}
|
local stmt = {}
|
||||||
|
|
||||||
local cursor_types = {
|
local cursor_types = {
|
||||||
|
Loading…
Reference in New Issue
Block a user