-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | A very simple triple store -- -- A very simple triple store @package tripLL @version 0.1.0.0 -- | Gives a basic interface to a triple store. See homepage for an -- example. module TripLL -- | The Triplestore typeclass is an interface for triple stores. -- Every backend of this library uses this interface. class Triplestore h b | h -> b -- | most simple actions, a triple store has to support, put and -- del of triples: put :: Triplestore h b => Triple b -> h -> IO () del :: Triplestore h b => Triple b -> h -> IO () -- | doing several simple actions in one go, one can use batch. batch :: Triplestore h b => [BatchAction b] -> h -> IO () -- | querying triples is done by filling in the known fields with 'Just x'. query :: Triplestore h b => QueryTriple b -> h -> IO [Triple b] withTrip :: Triplestore h b => FilePath -> (h -> IO a) -> IO a createAndOpen :: Triplestore h b => FilePath -> IO h open :: Triplestore h b => FilePath -> IO h close :: Triplestore h b => h -> IO () -- | A Triple is just anything consisting of three ordered pieces. data Triple a Triple :: a -> a -> a -> Triple a [subject] :: Triple a -> a [predicate] :: Triple a -> a [object] :: Triple a -> a -- | TriplePosition gives a type for the fields within a -- Triple. data TriplePosition Subject :: TriplePosition Predicate :: TriplePosition Object :: TriplePosition -- | flatten forgets about the description of the fields. flatten :: Triple a -> (a, a, a) -- | QueryTriple is a shorthand for Triple where the argument -- is encapsulated within a Maybe. type QueryTriple a = Triple (Maybe a) -- | A BatchAction is either a Put or a Delete, i.e. -- either a `write given triple into database` or a `delete given triple -- from database`. data BatchAction a Put :: (Triple a) -> BatchAction a Delete :: (Triple a) -> BatchAction a instance GHC.Show.Show TripLL.TriplePosition instance GHC.Classes.Eq TripLL.TriplePosition -- | Gives an implementation for the tripLL interface based upon the -- LevelDB database. module TripLL.Bindings.LevelDBHexa -- | The main handle of this implementation, LevelDBHexa. type LevelDBHexa = DB instance Data.Serialize.Serialize TripLL.Bindings.LevelDBHexa.ByTriple instance TripLL.Triplestore TripLL.Bindings.LevelDBHexa.LevelDBHexa Data.ByteString.Internal.ByteString