| Maintainer | Toshio Ito <debug.ito@gmail.com> |
|---|---|
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Data.Greskell.Greskell
Description
Synopsis
- data Greskell a
- class ToGreskell a where
- type GreskellReturn a
- toGreskell :: a -> Greskell (GreskellReturn a)
- toGremlin :: ToGreskell a => a -> Text
- toGremlinLazy :: ToGreskell a => a -> Text
- string :: Text -> Greskell Text
- true :: Greskell Bool
- false :: Greskell Bool
- list :: [Greskell a] -> Greskell [a]
- single :: Greskell a -> Greskell [a]
- number :: Scientific -> Greskell Scientific
- value :: Value -> Greskell Value
- valueInt :: Integral a => a -> Greskell Value
- gvalue :: Value -> Greskell GValue
- gvalueInt :: Integral a => a -> Greskell GValue
- unsafeGreskell :: Text -> Greskell a
- unsafeGreskellLazy :: Text -> Greskell a
- unsafeFunCall :: Text -> [Text] -> Greskell a
- unsafeMethodCall :: Greskell a -> Text -> [Text] -> Greskell b
- examples :: [(Text, Text)]
Type
Gremlin expression of type a.
Greskell is essentially just a piece of Gremlin script with a
phantom type. The type a represents the type of data that the
script is supposed to evaluate to.
Eq and Ord instances compare Gremlin scripts, NOT the values
they evaluate to.
Instances
| Functor Greskell Source # | Unsafely convert the phantom type. |
| IsString a => IsString (Greskell a) Source # | Same as |
Defined in Data.Greskell.Greskell Methods fromString :: String -> Greskell a # | |
| IsString a => Monoid (Greskell a) Source # | Monoidal operations on |
| IsString a => Semigroup (Greskell a) Source # | Semigroup operator |
| Num a => Num (Greskell a) Source # | Integer literals and numeric operation in Gremlin |
Defined in Data.Greskell.Greskell | |
| Fractional a => Fractional (Greskell a) Source # | Floating-point number literals and numeric operation in Gremlin |
| Show (Greskell a) Source # | |
| Eq (Greskell a) Source # | |
| Ord (Greskell a) Source # | |
Defined in Data.Greskell.Greskell | |
| ToGreskell (Greskell a) Source # | It's just |
Defined in Data.Greskell.Greskell Associated Types type GreskellReturn (Greskell a) Source # Methods toGreskell :: Greskell a -> Greskell (GreskellReturn (Greskell a)) Source # | |
| type GreskellReturn (Greskell a) Source # | |
Defined in Data.Greskell.Greskell | |
class ToGreskell a where Source #
Something that can convert to Greskell.
Methods
toGreskell :: a -> Greskell (GreskellReturn a) Source #
Instances
| ToGreskell (Greskell a) Source # | It's just |
Defined in Data.Greskell.Greskell Associated Types type GreskellReturn (Greskell a) Source # Methods toGreskell :: Greskell a -> Greskell (GreskellReturn (Greskell a)) Source # | |
Conversions
toGremlinLazy :: ToGreskell a => a -> Text Source #
Literals
Functions to create literals in Gremlin script. Use fromInteger,
valueInt or gvalueInt to create integer literals. Use
fromRational or number to create floating-point data literals.
string :: Text -> Greskell Text Source #
Create a String literal in Gremlin script. The content is automatically escaped.
single :: Greskell a -> Greskell [a] Source #
Make a list with a single object. Useful to prevent the Gremlin Server from automatically iterating the result object.
number :: Scientific -> Greskell Scientific Source #
Arbitrary precision number literal, like "123e8".
gvalueInt :: Integral a => a -> Greskell GValue Source #
Integer literal as GValue type.
Since: 0.1.2.0
Unsafe constructors
Unsafely create a Greskell of arbitrary type. The given Gremlin
script is printed as-is.
Same as unsafeGreskell, but it takes lazy Text.
Unsafely create a Greskell that calls the given function with
the given arguments.
Arguments
| :: Greskell a | target object |
| -> Text | method name |
| -> [Text] | arguments |
| -> Greskell b | return value of the method call |
Unsafely create a Greskell that calls the given object method
call with the given target and arguments.