Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
openbus-sdk-lua
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
openbus
openbus-sdk-lua
Commits
b26a84a7
Commit
b26a84a7
authored
Oct 07, 2017
by
Amadeu Andrade Barbosa Junior
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
OPENBUS-3053 Correção da falta de verificação do retorno do statement SQL no método Database:exec
parent
9ad4c3ec
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
6 deletions
+4
-6
database.lua
lua/openbus/util/database.lua
+4
-6
No files found.
lua/openbus/util/database.lua
View file @
b26a84a7
...
...
@@ -388,14 +388,12 @@ end
function
DataBase
:
exec
(
stmt
)
local
gsql
=
gsubSQL
(
stmt
)
log
:
database
(
stmt
)
local
res
,
errmsg
=
herror
(
self
.
conn
:
exec
(
stmt
)
)
errmsg
=
gsql
..
" "
..
emsgprefix
..
tostring
(
errcode
)
if
errcode
==
lsqlite
.
DONE
then
local
errcode
=
self
.
conn
:
exec
(
stmt
)
local
errmsg
=
gsql
..
" "
..
emsgprefix
..
tostring
(
errcode
)
if
errcode
==
lsqlite
.
DONE
or
errcode
==
lsqlite
.
OK
then
return
true
elseif
errcode
==
lsqlite
.
ERROR
then
return
nil
,
errmsg
..
"; "
..
self
.
conn
:
errmsg
()
end
return
nil
,
errmsg
return
nil
,
errmsg
..
"; "
..
self
.
conn
:
errmsg
()
end
function
DataBase
:
pexec
(
action
,
...
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment