File: Internal.hs

package info (click to toggle)
haskell-persistent-sqlite 2.13.3.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 9,440 kB
  • sloc: ansic: 159,841; haskell: 1,753; makefile: 3
file content (27 lines) | stat: -rw-r--r-- 925 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
-- | Utterly unsafe internals of the "Database.Sqlite" module. Useful for
-- people who want access to the SQLite database pointer to manually call
-- SQLite API functions via the FFI.
--
-- Types and functions in this module are *NOT* covered by the PVP and may
-- change breakingly in any future version of the package.
module Database.Sqlite.Internal where

import Data.IORef (IORef)
import Foreign.Ptr (Ptr)

-- | SQLite connection type, consist of an IORef tracking whether the
-- connection has been closed and the raw SQLite C API pointer, wrapped in a
-- 'Connection\'' newtype.
--
-- @since 2.10.2
data Connection = Connection !(IORef Bool) Connection'

-- | Newtype wrapping SQLite C API pointer for a database connection.
--
-- @since 2.10.2
newtype Connection' = Connection' (Ptr ())

-- | Newtype wrapping SQLite C API pointer for a prepared statement.
--
-- @since 2.10.2
newtype Statement = Statement (Ptr ())