Skip to content

Commit 682a0b0

Browse files
committed
v2 - transactions
1 parent f897941 commit 682a0b0

File tree

2 files changed

+26
-2
lines changed

2 files changed

+26
-2
lines changed

Diff for: Project.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "SearchLightPostgreSQL"
22
uuid = "4327cdd6-4902-11ea-0272-430cea0431bd"
33
authors = ["Adrian Salceanu <[email protected]>"]
4-
version = "1"
4+
version = "2.0.0"
55

66
[deps]
77
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
@@ -12,5 +12,5 @@ SearchLight = "340e8cb6-72eb-11e8-37ce-c97ebeb32050"
1212
[compat]
1313
DataFrames = "1"
1414
LibPQ = "1"
15-
SearchLight = "1"
15+
SearchLight = "2"
1616
julia = "1"

Diff for: src/SearchLightPostgreSQL.jl

+24
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,30 @@ function SearchLight.Migration.column_id_sequence(table_name::Union{String,Symbo
405405
end
406406

407407

408+
#### TRANSACTIONS ####
409+
410+
411+
function SearchLight.Transactions.begin_transaction() :: Nothing
412+
SearchLight.query("BEGIN")
413+
414+
nothing
415+
end
416+
417+
418+
function SearchLight.Transactions.commit_transaction() :: Nothing
419+
SearchLight.query("COMMIT")
420+
421+
nothing
422+
end
423+
424+
425+
function SearchLight.Transactions.rollback_transaction() :: Nothing
426+
SearchLight.query("ROLLBACK")
427+
428+
nothing
429+
end
430+
431+
408432
#### GENERATOR ####
409433

410434

0 commit comments

Comments
 (0)