From 4feaa33c6dea6d7eea78ebbaa59325b49f8d91a1 Mon Sep 17 00:00:00 2001 From: Advanced Alpaka Date: Sun, 17 Jul 2022 14:21:40 +0300 Subject: [PATCH] add selector with name --- src/Database/Bolt/Extras/DSL/Internal/Instances.hs | 1 + src/Database/Bolt/Extras/DSL/Internal/Types.hs | 1 + 2 files changed, 2 insertions(+) diff --git a/src/Database/Bolt/Extras/DSL/Internal/Instances.hs b/src/Database/Bolt/Extras/DSL/Internal/Instances.hs index c408223..d1d31e6 100644 --- a/src/Database/Bolt/Extras/DSL/Internal/Instances.hs +++ b/src/Database/Bolt/Extras/DSL/Internal/Instances.hs @@ -122,6 +122,7 @@ instance ToCypher PathSelector where instance ToCypher Selector where toCypher (PS ps) = toCypher ps + toCypher (PSwN (name, ps)) = name <> "=" <> toCypher ps toCypher (TS txt) = txt instance ToCypher Selectors where diff --git a/src/Database/Bolt/Extras/DSL/Internal/Types.hs b/src/Database/Bolt/Extras/DSL/Internal/Types.hs index 24c961d..a130acc 100644 --- a/src/Database/Bolt/Extras/DSL/Internal/Types.hs +++ b/src/Database/Bolt/Extras/DSL/Internal/Types.hs @@ -118,6 +118,7 @@ infixl 1 <-: ns <-: pp = P ns :<-!: pp data Selector = PS PathSelector -- ^ path selector + | PSwN (Text, Selector) -- ^ named selector | TS Text -- ^ free text selector deriving (Show, Eq)