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

Database.Bolty.Value.Helpers

Description

Internal module. Not part of the public API.

Synopsis

Checkers

isTinyInt :: Integral a => a -> Bool Source #

Check whether a value fits in the PackStream tiny integer range [-16, 127].

isTinyWord :: Word8 -> Bool Source #

Check whether a tag byte represents a tiny word (inline integer).

isTinyText :: Word8 -> Bool Source #

Check whether a tag byte represents a tiny text (length embedded in tag).

isTinyList :: Word8 -> Bool Source #

Check whether a tag byte represents a tiny list (length embedded in tag).

isTinyDict :: Word8 -> Bool Source #

Check whether a tag byte represents a tiny dictionary (length embedded in tag).

isTinyStruct :: Word8 -> Bool Source #

Check whether a tag byte represents a tiny structure (length embedded in tag).

isNull :: Word8 -> Bool Source #

Check whether a tag byte is the null marker.

isBool :: Word8 -> Bool Source #

Check whether a tag byte is a boolean marker (true or false).

isInt :: Word8 -> Bool Source #

Check whether a tag byte represents any integer encoding.

isDouble :: Word8 -> Bool Source #

Check whether a tag byte is the double (float64) marker.

isDict :: Word8 -> Bool Source #

Check whether a tag byte represents any dictionary encoding.

isText :: Word8 -> Bool Source #

Check whether a tag byte represents any text encoding.

isList :: Word8 -> Bool Source #

Check whether a tag byte represents any list encoding.

isStruct :: Word8 -> Bool Source #

Check whether a tag byte represents any structure encoding.

isNewVersion :: Word32 -> Bool Source #

Check whether a negotiated version uses the new (v3+) handshake format.

Version helpers

versionMajor :: Word32 -> Word8 Source #

Extract the major version from a negotiated version Word32. The server responds with [0, 0, minor, major].

versionMinor :: Word32 -> Word8 Source #

Extract the minor version from a negotiated version Word32.

supportsLogonLogoff :: Word32 -> Bool Source #

Bolt 5.1+ uses LOGON/LOGOFF instead of credentials in HELLO.

supportsTelemetry :: Word32 -> Bool Source #

Bolt 5.4+ supports the TELEMETRY message.

Constants

nullCode :: Word8 Source #

Tag bytes for null, false, and true.

falseCode :: Word8 Source #

Tag bytes for null, false, and true.

trueCode :: Word8 Source #

Tag bytes for null, false, and true.

int8Code :: Word8 Source #

Tag bytes for integer and double encodings.

int16Code :: Word8 Source #

Tag bytes for integer and double encodings.

int32Code :: Word8 Source #

Tag bytes for integer and double encodings.

int64Code :: Word8 Source #

Tag bytes for integer and double encodings.

doubleCode :: Word8 Source #

Tag bytes for integer and double encodings.

textConst :: Word8 Source #

Tag bytes for text encodings (tiny base and sized variants).

text8Code :: Word8 Source #

Tag bytes for text encodings (tiny base and sized variants).

text16Code :: Word8 Source #

Tag bytes for text encodings (tiny base and sized variants).

text32Code :: Word8 Source #

Tag bytes for text encodings (tiny base and sized variants).

listConst :: Word8 Source #

Tag bytes for list encodings (tiny base and sized variants).

list8Code :: Word8 Source #

Tag bytes for list encodings (tiny base and sized variants).

list16Code :: Word8 Source #

Tag bytes for list encodings (tiny base and sized variants).

list32Code :: Word8 Source #

Tag bytes for list encodings (tiny base and sized variants).

dictConst :: Word8 Source #

Tag bytes for dictionary encodings (tiny base and sized variants).

dict8Code :: Word8 Source #

Tag bytes for dictionary encodings (tiny base and sized variants).

dict16Code :: Word8 Source #

Tag bytes for dictionary encodings (tiny base and sized variants).

dict32Code :: Word8 Source #

Tag bytes for dictionary encodings (tiny base and sized variants).

structConst :: Word8 Source #

Tag bytes for structure encodings (tiny base and sized variants).

struct8Code :: Word8 Source #

Tag bytes for structure encodings (tiny base and sized variants).

struct16Code :: Word8 Source #

Tag bytes for structure encodings (tiny base and sized variants).

sigNode :: Word8 Source #

Structure signature bytes for graph types (Node, Relationship, UnboundRelationship, Path).

sigRel :: Word8 Source #

Structure signature bytes for graph types (Node, Relationship, UnboundRelationship, Path).

sigURel :: Word8 Source #

Structure signature bytes for graph types (Node, Relationship, UnboundRelationship, Path).

sigPath :: Word8 Source #

Structure signature bytes for graph types (Node, Relationship, UnboundRelationship, Path).

sigDate :: Word8 Source #

Structure signature bytes for temporal types.

sigTime :: Word8 Source #

Structure signature bytes for temporal types.

sigLocalTime :: Word8 Source #

Structure signature bytes for temporal types.

sigDateTime :: Word8 Source #

Structure signature bytes for temporal types.

sigDateTimeZoneId :: Word8 Source #

Structure signature bytes for temporal types.

sigLocalDateTime :: Word8 Source #

Structure signature bytes for temporal types.

sigDuration :: Word8 Source #

Structure signature bytes for temporal types.

sigPoint2D :: Word8 Source #

Structure signature bytes for spatial point types.

sigPoint3D :: Word8 Source #

Structure signature bytes for spatial point types.

sigInit :: Word8 Source #

Structure signature bytes for client request messages.

sigHello :: Word8 Source #

Structure signature bytes for client request messages.

sigRun :: Word8 Source #

Structure signature bytes for client request messages.

sigAFail :: Word8 Source #

Structure signature bytes for client request messages.

sigReset :: Word8 Source #

Structure signature bytes for client request messages.

sigDAll :: Word8 Source #

Structure signature bytes for client request messages.

sigPAll :: Word8 Source #

Structure signature bytes for client request messages.

sigGBye :: Word8 Source #

Structure signature bytes for client request messages.

sigSucc :: Word8 Source #

Structure signature bytes for server response messages.

sigFail :: Word8 Source #

Structure signature bytes for server response messages.

sigRecs :: Word8 Source #

Structure signature bytes for server response messages.

sigIgn :: Word8 Source #

Structure signature bytes for server response messages.

Helpers

toInt :: Integral a => a -> Int Source #

Convert any Integral value to Int.

getSize :: Word8 -> Int Source #

Extract the size from the low nibble of a tag byte.

inRange :: Ord a => (a, a) -> a -> Bool Source #

Check whether a value lies in the half-open interval [low, up).

isIntX :: Integral x => x -> x -> Bool Source #

Check whether a value fits in a signed integer with p bits.