Database.PostgreSQL.Simple.Internal
- data Field = Field {}
- name :: Field -> Maybe ByteString
- tableOid :: Field -> Oid
- tableColumn :: Field -> Int
- format :: Field -> Format
- typeOid :: Field -> Oid
- data Connection = Connection {}
- data SqlType
- = Builtin BuiltinType
- | Other Oid
- data SqlError = SqlError {}
- data ConnectInfo = ConnectInfo {}
- defaultConnectInfo :: ConnectInfo
- connect :: ConnectInfo -> IO Connection
- connectPostgreSQL :: ByteString -> IO Connection
- postgreSQLConnectionString :: ConnectInfo -> ByteString
- oid2int :: Oid -> Int
- exec :: Connection -> ByteString -> IO Result
- withConnection :: Connection -> (Connection -> IO a) -> IO a
- close :: Connection -> IO ()
- data RawResult = RawResult {
- rawField :: Field
- rawData :: Maybe ByteString
Documentation
A Field represents metadata about a particular field
You don't particularly want to retain these structures for a long period of time, as they will retain the entire query result, not just the field metadata
name :: Field -> Maybe ByteStringSource
tableColumn :: Field -> IntSource
data Connection Source
Constructors
Connection | |
Fields |
Constructors
SqlError | |
Fields
|
data ConnectInfo Source
Constructors
ConnectInfo | |
Fields
|
Instances
connect :: ConnectInfo -> IO ConnectionSource
Connect with the given username to the given database. Will throw an exception if it cannot connect.
exec :: Connection -> ByteString -> IO ResultSource
withConnection :: Connection -> (Connection -> IO a) -> IO aSource
Atomically perform an action with the database handle, if there is one.
close :: Connection -> IO ()Source