-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
35f33cf
commit d4bcbb5
Showing
14 changed files
with
99 additions
and
255 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,13 @@ | ||
-- | | ||
-- An API for declaration of transactions. | ||
module Hasql.Transaction | ||
( | ||
-- * Transaction monad | ||
Transaction, | ||
condemn, | ||
sql, | ||
statement, | ||
) | ||
( -- * Transaction monad | ||
Transaction, | ||
condemn, | ||
sql, | ||
statement, | ||
) | ||
where | ||
|
||
import Hasql.Transaction.Config | ||
import Hasql.Transaction.Private.Transaction | ||
import Hasql.Transaction.Private.Model |
28 changes: 12 additions & 16 deletions
28
library/Hasql/Transaction/Private/Model.hs → library/Hasql/Transaction/Config.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,21 @@ | ||
module Hasql.Transaction.Private.Model | ||
where | ||
module Hasql.Transaction.Config where | ||
|
||
import Hasql.Transaction.Private.Prelude | ||
|
||
-- | | ||
-- | ||
data Mode = | ||
-- | | ||
-- Read-only. No writes possible. | ||
Read | | ||
-- | | ||
-- Write and commit. | ||
Write | ||
data Mode | ||
= -- | | ||
-- Read-only. No writes possible. | ||
Read | ||
| -- | | ||
-- Write and commit. | ||
Write | ||
deriving (Show, Eq, Ord, Enum, Bounded) | ||
|
||
-- | | ||
-- For reference see | ||
-- <http://www.postgresql.org/docs/current/static/transaction-iso.html the Postgres' documentation>. | ||
-- | ||
data IsolationLevel = | ||
ReadCommitted | | ||
RepeatableRead | | ||
Serializable | ||
data IsolationLevel | ||
= ReadCommitted | ||
| RepeatableRead | ||
| Serializable | ||
deriving (Show, Eq, Ord, Enum, Bounded) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.