Skip to content

Commit ce8735d

Browse files
committed
Return the result of the transaction function being applied
1 parent 4e33f5b commit ce8735d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/DBInterface.jl

+2-1
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,9 @@ performance in database systems.
166166
function transaction(f, conn::Connection)
167167
execute(conn, "BEGIN TRANSACTION;")
168168
try
169-
f()
169+
ret = f()
170170
execute(conn, "COMMIT;")
171+
return ret
171172
catch e
172173
execute(conn, "ROLLBACK;")
173174
rethrow(e)

0 commit comments

Comments
 (0)