bolty-0.1.0.2: Haskell driver for Neo4j (BOLT protocol 4.4-5.4)
Safe HaskellNone
LanguageGHC2021

Database.Bolty.Util

Description

Internal module. Not part of the public API.

Synopsis

Documentation

chunksOfBSL :: Partial => Int64 -> ByteString -> [ByteString] Source #

Split a lazy ByteString into chunks of at most n bytes.

chunksOfBS :: Partial => Int -> ByteString -> [ByteString] Source #

Split a strict ByteString into chunks of at most n bytes.

putTextUtf8 :: Text -> Put () Source #

Encode Text as raw UTF-8 bytes into the Put monad.

decodeStrict :: HasEndianness a => ByteString -> a Source #

Decode a big-endian value from a strict ByteString, throwing on failure.

encodeStrict :: HasEndianness a => a -> ByteString Source #

Encode a value as a big-endian strict ByteString.

lazyByteStringToHex :: ByteString -> ByteString Source #

Convert a lazy ByteString to an uppercase hex-encoded strict ByteString.

whenInvalid :: a -> Bool -> Text -> Validation [Text] a Source #

Return Failure with the given error when the condition is True, otherwise Success.