| Safe Haskell | None |
|---|---|
| Language | Haskell98 |
Database.Graph.HGraphStorage.Types
Description
Base types and simple functions on them
- type GraphUsableMonad m = (MonadBaseControl IO m, MonadResource m, MonadLogger m)
- type ObjectID = Int32
- type ObjectTypeID = Int16
- type RelationID = Int32
- type RelationTypeID = Int16
- type PropertyID = Int32
- type PropertyTypeID = Int16
- type DataTypeID = Int8
- type PropertyValueOffset = Int64
- type PropertyValueLength = Int64
- data Object = Object {}
- objectSize :: Int64
- binLength :: Binary b => b -> Int64
- data Relation = Relation {}
- relationSize :: Int64
- data Property = Property {}
- propertySize :: Int64
- data PropertyType = PropertyType {}
- propertyTypeSize :: Int64
- data ObjectType = ObjectType {}
- objectTypeSize :: Int64
- data RelationType = RelationType {}
- relationTypeSize :: Int64
- data Handles = Handles {}
- data Model = Model {}
- namePropertyID :: PropertyTypeID
- data Lookup a b = Lookup {}
- addToLookup :: (Ord a, Ord b) => a -> b -> Lookup a b -> Lookup a b
- data DataType
- dataTypeID :: DataType -> DataTypeID
- dataType :: DataTypeID -> DataType
- data PropertyValue
- valueType :: PropertyValue -> DataType
- valueToIndex :: PropertyValue -> [Int16]
- textToKey :: Text -> [Int16]
- integerToKey :: Integer -> [Int16]
- bytestringToKey :: ByteString -> [Int16]
- data GraphStorageException
- data GraphSettings = GraphSettings {}
Documentation
type GraphUsableMonad m = (MonadBaseControl IO m, MonadResource m, MonadLogger m) Source
put our constraints in one synonym
type ObjectTypeID = Int16 Source
IDs for types of objects
type RelationID = Int32 Source
IDs for relations
type RelationTypeID = Int16 Source
IDs for types of relations
type PropertyID = Int32 Source
IDs for property values
type PropertyTypeID = Int16 Source
IDs for types of properties
type DataTypeID = Int8 Source
IDs for data types
type PropertyValueOffset = Int64 Source
Offset of property value on value file
type PropertyValueLength = Int64 Source
Length of property value on value file
An object as represented in the object file
Constructors
| Object | |
Fields
| |
Size of an object record
binLength :: Binary b => b -> Int64 Source
Calculates the length of the binary serialization of the given object
A relation as represented in the relation file
Constructors
| Relation | |
Fields
| |
size of a relation record
A property as represented in the property file
Constructors
| Property | |
Fields
| |
size of a property record
data PropertyType Source
Type of a property as represented in the property type file
Constructors
| PropertyType | |
Fields
| |
Instances
| Eq PropertyType | |
| Ord PropertyType | |
| Read PropertyType | |
| Show PropertyType | |
| Generic PropertyType | |
| Binary PropertyType | simple binary instance |
| Default PropertyType | simple default instance |
| Typeable * PropertyType | |
| GraphIdSerializable PropertyTypeID PropertyType | Serialization methods for PropertyTypeID + PropertyType |
| type Rep PropertyType |
propertyTypeSize :: Int64 Source
size of a property type record
data ObjectType Source
Type of an object as represented in the object type file
Constructors
| ObjectType | |
Fields
| |
Instances
| Eq ObjectType | |
| Ord ObjectType | |
| Read ObjectType | |
| Show ObjectType | |
| Generic ObjectType | |
| Binary ObjectType | simple binary instance |
| Default ObjectType | simple default instance |
| Typeable * ObjectType | |
| GraphIdSerializable ObjectTypeID ObjectType | Serialization methods for ObjectTypeID + ObjectType |
| type Rep ObjectType |
objectTypeSize :: Int64 Source
Size of an object type record
data RelationType Source
Type of a relation as represented in the relation type file
Constructors
| RelationType | |
Fields
| |
Instances
| Eq RelationType | |
| Ord RelationType | |
| Read RelationType | |
| Show RelationType | |
| Generic RelationType | |
| Binary RelationType | simple binary instance |
| Default RelationType | simple default instance |
| Typeable * RelationType | |
| GraphIdSerializable RelationTypeID RelationType | Serialization methods for RelationTypeID + RelationType |
| type Rep RelationType |
relationTypeSize :: Int64 Source
Size of a relation type record
Handles to the various files
Constructors
| Handles | |
Fields | |
The current model: lookup tables between names and ids types of artifacts
Constructors
| Model | |
Fields | |
namePropertyID :: PropertyTypeID Source
the ID of the "name" property
A lookup table allowing two ways lookup
the supported data types for properties
dataTypeID :: DataType -> DataTypeID Source
Convert a DataType object to its ID
dataType :: DataTypeID -> DataType Source
Convert a DataType ID to the Haskell object
data PropertyValue Source
A typed property value
valueType :: PropertyValue -> DataType Source
Get the data type for a given value
valueToIndex :: PropertyValue -> [Int16] Source
Get the value in a format ready to index
integerToKey :: Integer -> [Int16] Source
Transform an integer in a index key
bytestringToKey :: ByteString -> [Int16] Source
Transform a bytestring in a index key
data GraphStorageException Source
The exceptions we may throw
Constructors
| IncoherentNamePropertyTypeID PropertyTypeID PropertyTypeID | Something is not right with the name property |
| UnknownPropertyType PropertyTypeID | |
| NoNameProperty PropertyTypeID | |
| MultipleNameProperty PropertyTypeID | |
| UnknownObjectType ObjectTypeID | |
| UnknownRelationType RelationTypeID | |
| DuplicateIndexKey [Text] |
Instances
| Eq GraphStorageException | |
| Ord GraphStorageException | |
| Read GraphStorageException | |
| Show GraphStorageException | |
| Exception GraphStorageException | Make our exception a standard exception |
| Typeable * GraphStorageException |
data GraphSettings Source
Settings for the Graph DB
Constructors
| GraphSettings | |
Fields | |
Instances
| Eq GraphSettings | |
| Ord GraphSettings | |
| Read GraphSettings | |
| Show GraphSettings | |
| Default GraphSettings | Default instance for settings |
| Typeable * GraphSettings |