| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Database.Bolty.Value.Type
Description
Internal module. Not part of the public API.
Bolt value types: the Haskell representation of Neo4j values returned by queries.
Synopsis
- data Bolt
- = BoltNull
- | BoltBoolean !Bool
- | BoltInteger !PSInteger
- | BoltFloat !Double
- | BoltBytes !ByteString
- | BoltString !Text
- | BoltList !(Vector Bolt)
- | BoltDictionary !(HashMap Text Bolt)
- | BoltNode Node
- | BoltRelationship Relationship
- | BoltUnboundRelationship UnboundRelationship
- | BoltPath Path
- | BoltDate Date
- | BoltTime Time
- | BoltLocalTime LocalTime
- | BoltDateTime DateTime
- | BoltDateTimeZoneId DateTimeZoneId
- | BoltLocalDateTime LocalDateTime
- | BoltDuration Duration
- | BoltPoint2D Point2D
- | BoltPoint3D Point3D
- asNull :: Bolt -> Maybe ()
- asBool :: Bolt -> Maybe Bool
- asInt :: Bolt -> Maybe PSInteger
- asFloat :: Bolt -> Maybe Double
- asBytes :: Bolt -> Maybe ByteString
- asText :: Bolt -> Maybe Text
- asList :: Bolt -> Maybe (Vector Bolt)
- asDict :: Bolt -> Maybe (HashMap Text Bolt)
- asNode :: Bolt -> Maybe Node
- asRelationship :: Bolt -> Maybe Relationship
- asPath :: Bolt -> Maybe Path
- data Node = Node {
- id :: !Int64
- labels :: !(Vector Text)
- properties :: !(HashMap Text Ps)
- element_id :: !Text
- data Relationship = Relationship {
- id :: !Int64
- startNodeId :: !Int64
- endNodeId :: !Int64
- type_ :: !Text
- properties :: !(HashMap Text Ps)
- element_id :: !Text
- start_node_element_id :: !Text
- end_node_element_id :: !Text
- data UnboundRelationship = UnboundRelationship {
- id :: !Int64
- type_ :: !Text
- properties :: !(HashMap Text Ps)
- element_id :: !Text
- data Path = Path {}
- data Date = Date {}
- data Time = Time {
- nanoseconds :: !Int64
- tz_offset_seconds :: !Int64
- data LocalTime = LocalTime {
- nanoseconds :: !Int64
- data DateTime = DateTime {
- seconds :: !Int64
- nanoseconds :: !Int64
- tz_offset_seconds :: !Int64
- data DateTimeZoneId = DateTimeZoneId {}
- data LocalDateTime = LocalDateTime {
- seconds :: !Int64
- nanoseconds :: !Int64
- data Duration = Duration {}
- data Point2D = Point2D {}
- data Point3D = Point3D {}
Documentation
A typed Neo4j value. Every field in a query result record is a Bolt.
Constructors
Instances
Bolt value extractors
asRelationship :: Bolt -> Maybe Relationship Source #
Extract a relationship value.
Graph types
A graph node.
Constructors
| Node | |
Fields
| |
Instances
| Generic Node Source # | |||||
Defined in Database.Bolty.Value.Type Associated Types
| |||||
| Show Node Source # | |||||
| Eq Node Source # | |||||
| PackStream Node Source # | |||||
| type Rep Node Source # | |||||
Defined in Database.Bolty.Value.Type type Rep Node = D1 ('MetaData "Node" "Database.Bolty.Value.Type" "bolty-0.1.0.2-D4CzMg1BY3r5YzeDrGyWz4" 'False) (C1 ('MetaCons "Node" 'PrefixI 'True) ((S1 ('MetaSel ('Just "id") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int64) :*: S1 ('MetaSel ('Just "labels") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Vector Text))) :*: (S1 ('MetaSel ('Just "properties") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HashMap Text Ps)) :*: S1 ('MetaSel ('Just "element_id") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text)))) | |||||
data Relationship Source #
A graph relationship (edge).
Constructors
| Relationship | |
Fields
| |
Instances
| Generic Relationship Source # | |||||
Defined in Database.Bolty.Value.Type Associated Types
| |||||
| Show Relationship Source # | |||||
Defined in Database.Bolty.Value.Type Methods showsPrec :: Int -> Relationship -> ShowS # show :: Relationship -> String # showList :: [Relationship] -> ShowS # | |||||
| Eq Relationship Source # | |||||
Defined in Database.Bolty.Value.Type | |||||
| PackStream Relationship Source # | |||||
Defined in Database.Bolty.Value.Type Methods toPs :: Relationship -> Ps # toBinary :: Relationship -> Put # fromPs :: Ps -> Result Relationship # | |||||
| type Rep Relationship Source # | |||||
Defined in Database.Bolty.Value.Type type Rep Relationship = D1 ('MetaData "Relationship" "Database.Bolty.Value.Type" "bolty-0.1.0.2-D4CzMg1BY3r5YzeDrGyWz4" 'False) (C1 ('MetaCons "Relationship" 'PrefixI 'True) (((S1 ('MetaSel ('Just "id") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int64) :*: S1 ('MetaSel ('Just "startNodeId") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int64)) :*: (S1 ('MetaSel ('Just "endNodeId") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int64) :*: S1 ('MetaSel ('Just "type_") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text))) :*: ((S1 ('MetaSel ('Just "properties") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HashMap Text Ps)) :*: S1 ('MetaSel ('Just "element_id") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text)) :*: (S1 ('MetaSel ('Just "start_node_element_id") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "end_node_element_id") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text))))) | |||||
data UnboundRelationship Source #
A relationship without start/end node information (used in paths).
Constructors
| UnboundRelationship | |
Fields
| |
Instances
| Generic UnboundRelationship Source # | |||||
Defined in Database.Bolty.Value.Type Associated Types
Methods from :: UnboundRelationship -> Rep UnboundRelationship x # to :: Rep UnboundRelationship x -> UnboundRelationship # | |||||
| Show UnboundRelationship Source # | |||||
Defined in Database.Bolty.Value.Type Methods showsPrec :: Int -> UnboundRelationship -> ShowS # show :: UnboundRelationship -> String # showList :: [UnboundRelationship] -> ShowS # | |||||
| Eq UnboundRelationship Source # | |||||
Defined in Database.Bolty.Value.Type Methods (==) :: UnboundRelationship -> UnboundRelationship -> Bool # (/=) :: UnboundRelationship -> UnboundRelationship -> Bool # | |||||
| PackStream UnboundRelationship Source # | |||||
Defined in Database.Bolty.Value.Type Methods toPs :: UnboundRelationship -> Ps # toBinary :: UnboundRelationship -> Put # fromPs :: Ps -> Result UnboundRelationship # | |||||
| type Rep UnboundRelationship Source # | |||||
Defined in Database.Bolty.Value.Type type Rep UnboundRelationship = D1 ('MetaData "UnboundRelationship" "Database.Bolty.Value.Type" "bolty-0.1.0.2-D4CzMg1BY3r5YzeDrGyWz4" 'False) (C1 ('MetaCons "UnboundRelationship" 'PrefixI 'True) ((S1 ('MetaSel ('Just "id") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int64) :*: S1 ('MetaSel ('Just "type_") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text)) :*: (S1 ('MetaSel ('Just "properties") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HashMap Text Ps)) :*: S1 ('MetaSel ('Just "element_id") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text)))) | |||||
A graph path: an alternating sequence of nodes and relationships.
Constructors
| Path | |
Instances
| Generic Path Source # | |||||
Defined in Database.Bolty.Value.Type Associated Types
| |||||
| Show Path Source # | |||||
| Eq Path Source # | |||||
| PackStream Path Source # | |||||
| type Rep Path Source # | |||||
Defined in Database.Bolty.Value.Type type Rep Path = D1 ('MetaData "Path" "Database.Bolty.Value.Type" "bolty-0.1.0.2-D4CzMg1BY3r5YzeDrGyWz4" 'False) (C1 ('MetaCons "Path" 'PrefixI 'True) (S1 ('MetaSel ('Just "nodes") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Vector Node)) :*: (S1 ('MetaSel ('Just "rels") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Vector UnboundRelationship)) :*: S1 ('MetaSel ('Just "indices") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Vector Int64))))) | |||||
Temporal types
A date (days since Unix epoch).
A time with timezone offset.
Constructors
| Time | |
Fields
| |
Instances
| Generic Time Source # | |||||
Defined in Database.Bolty.Value.Type Associated Types
| |||||
| Show Time Source # | |||||
| Eq Time Source # | |||||
| PackStream Time Source # | |||||
| type Rep Time Source # | |||||
Defined in Database.Bolty.Value.Type type Rep Time = D1 ('MetaData "Time" "Database.Bolty.Value.Type" "bolty-0.1.0.2-D4CzMg1BY3r5YzeDrGyWz4" 'False) (C1 ('MetaCons "Time" 'PrefixI 'True) (S1 ('MetaSel ('Just "nanoseconds") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int64) :*: S1 ('MetaSel ('Just "tz_offset_seconds") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int64))) | |||||
A local time (no timezone).
Constructors
| LocalTime | |
Fields
| |
A date-time with timezone offset.
Constructors
| DateTime | |
Fields
| |
Instances
| Generic DateTime Source # | |||||
Defined in Database.Bolty.Value.Type Associated Types
| |||||
| Show DateTime Source # | |||||
| Eq DateTime Source # | |||||
| PackStream DateTime Source # | |||||
| type Rep DateTime Source # | |||||
Defined in Database.Bolty.Value.Type type Rep DateTime = D1 ('MetaData "DateTime" "Database.Bolty.Value.Type" "bolty-0.1.0.2-D4CzMg1BY3r5YzeDrGyWz4" 'False) (C1 ('MetaCons "DateTime" 'PrefixI 'True) (S1 ('MetaSel ('Just "seconds") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int64) :*: (S1 ('MetaSel ('Just "nanoseconds") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int64) :*: S1 ('MetaSel ('Just "tz_offset_seconds") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int64)))) | |||||
data DateTimeZoneId Source #
A date-time with named timezone (e.g. "Europe/Paris").
Constructors
| DateTimeZoneId | |
Instances
| Generic DateTimeZoneId Source # | |||||
Defined in Database.Bolty.Value.Type Associated Types
Methods from :: DateTimeZoneId -> Rep DateTimeZoneId x # to :: Rep DateTimeZoneId x -> DateTimeZoneId # | |||||
| Show DateTimeZoneId Source # | |||||
Defined in Database.Bolty.Value.Type Methods showsPrec :: Int -> DateTimeZoneId -> ShowS # show :: DateTimeZoneId -> String # showList :: [DateTimeZoneId] -> ShowS # | |||||
| Eq DateTimeZoneId Source # | |||||
Defined in Database.Bolty.Value.Type Methods (==) :: DateTimeZoneId -> DateTimeZoneId -> Bool # (/=) :: DateTimeZoneId -> DateTimeZoneId -> Bool # | |||||
| PackStream DateTimeZoneId Source # | |||||
Defined in Database.Bolty.Value.Type Methods toPs :: DateTimeZoneId -> Ps # toBinary :: DateTimeZoneId -> Put # fromPs :: Ps -> Result DateTimeZoneId # | |||||
| type Rep DateTimeZoneId Source # | |||||
Defined in Database.Bolty.Value.Type type Rep DateTimeZoneId = D1 ('MetaData "DateTimeZoneId" "Database.Bolty.Value.Type" "bolty-0.1.0.2-D4CzMg1BY3r5YzeDrGyWz4" 'False) (C1 ('MetaCons "DateTimeZoneId" 'PrefixI 'True) (S1 ('MetaSel ('Just "seconds") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int64) :*: (S1 ('MetaSel ('Just "nanoseconds") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int64) :*: S1 ('MetaSel ('Just "tz_id") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text)))) | |||||
data LocalDateTime Source #
A local date-time (no timezone).
Constructors
| LocalDateTime | |
Fields
| |
Instances
| Generic LocalDateTime Source # | |||||
Defined in Database.Bolty.Value.Type Associated Types
| |||||
| Show LocalDateTime Source # | |||||
Defined in Database.Bolty.Value.Type Methods showsPrec :: Int -> LocalDateTime -> ShowS # show :: LocalDateTime -> String # showList :: [LocalDateTime] -> ShowS # | |||||
| Eq LocalDateTime Source # | |||||
Defined in Database.Bolty.Value.Type Methods (==) :: LocalDateTime -> LocalDateTime -> Bool # (/=) :: LocalDateTime -> LocalDateTime -> Bool # | |||||
| PackStream LocalDateTime Source # | |||||
Defined in Database.Bolty.Value.Type Methods toPs :: LocalDateTime -> Ps # toBinary :: LocalDateTime -> Put # fromPs :: Ps -> Result LocalDateTime # | |||||
| type Rep LocalDateTime Source # | |||||
Defined in Database.Bolty.Value.Type type Rep LocalDateTime = D1 ('MetaData "LocalDateTime" "Database.Bolty.Value.Type" "bolty-0.1.0.2-D4CzMg1BY3r5YzeDrGyWz4" 'False) (C1 ('MetaCons "LocalDateTime" 'PrefixI 'True) (S1 ('MetaSel ('Just "seconds") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int64) :*: S1 ('MetaSel ('Just "nanoseconds") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int64))) | |||||
A temporal duration (months, days, seconds, nanoseconds).
Instances
| Generic Duration Source # | |||||
Defined in Database.Bolty.Value.Type Associated Types
| |||||
| Show Duration Source # | |||||
| Eq Duration Source # | |||||
| PackStream Duration Source # | |||||
| type Rep Duration Source # | |||||
Defined in Database.Bolty.Value.Type type Rep Duration = D1 ('MetaData "Duration" "Database.Bolty.Value.Type" "bolty-0.1.0.2-D4CzMg1BY3r5YzeDrGyWz4" 'False) (C1 ('MetaCons "Duration" 'PrefixI 'True) ((S1 ('MetaSel ('Just "months") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int64) :*: S1 ('MetaSel ('Just "days") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int64)) :*: (S1 ('MetaSel ('Just "seconds") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int64) :*: S1 ('MetaSel ('Just "nanoseconds") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int64)))) | |||||
Spatial types
A 2D spatial point.
Constructors
| Point2D | |
Instances
| Generic Point2D Source # | |||||
Defined in Database.Bolty.Value.Type Associated Types
| |||||
| Show Point2D Source # | |||||
| Eq Point2D Source # | |||||
| PackStream Point2D Source # | |||||
| type Rep Point2D Source # | |||||
Defined in Database.Bolty.Value.Type type Rep Point2D = D1 ('MetaData "Point2D" "Database.Bolty.Value.Type" "bolty-0.1.0.2-D4CzMg1BY3r5YzeDrGyWz4" 'False) (C1 ('MetaCons "Point2D" 'PrefixI 'True) (S1 ('MetaSel ('Just "srid") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int64) :*: (S1 ('MetaSel ('Just "x") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Double) :*: S1 ('MetaSel ('Just "y") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Double)))) | |||||
A 3D spatial point.
Constructors
| Point3D | |
Instances
| Generic Point3D Source # | |||||
Defined in Database.Bolty.Value.Type Associated Types
| |||||
| Show Point3D Source # | |||||
| Eq Point3D Source # | |||||
| PackStream Point3D Source # | |||||
| type Rep Point3D Source # | |||||
Defined in Database.Bolty.Value.Type type Rep Point3D = D1 ('MetaData "Point3D" "Database.Bolty.Value.Type" "bolty-0.1.0.2-D4CzMg1BY3r5YzeDrGyWz4" 'False) (C1 ('MetaCons "Point3D" 'PrefixI 'True) ((S1 ('MetaSel ('Just "srid") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int64) :*: S1 ('MetaSel ('Just "x") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Double)) :*: (S1 ('MetaSel ('Just "y") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Double) :*: S1 ('MetaSel ('Just "z") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Double)))) | |||||