tripLL: A very simple triple store

[ database, library, mit ] [ Propose Tags ]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1.0.0
Dependencies base (>=4.8 && <4.9), bytestring (>=0.10 && <0.11), cereal (>=0.4), filepath (>=1.4 && <1.5), leveldb-haskell (>=0.6) [details]
License MIT
Author Philipp Pfeiffer
Maintainer pfiff@hax-f.net
Category Database
Home page https://github.com/aphorisme/tripLL
Uploaded by apho at 2015-11-30T14:04:59Z
Distributions
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 839 total (1 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2015-11-30 [all 1 reports]

Readme for tripLL-0.1.0.0

[back to package description]

tripLL

Introduction

tripLL is a very simple triple store, written in Haskell. It provides a basic interface to write, delete and query triples -- in fact, that's it. On top, there are some bindings to realizations of triple stores, such that this tiny library can be used out of box.

Right now it is thought that exactly one binding is imported within a project and only this binding (since it re-exports the interface).

A simple example

{-# LANGUAGE OverloadedStrings #-}

{- This examples uses the leveldb realization. This means that triples become triples of strict bytestrings and the leveldb lib has to be installed. -}

import TripLL.Bindings.LevelDBHexa

main = do -- open the database:
          handle <- createAndOpen "data/store.tripdb" :: IO LevelDBHexa
          -- batch something into it:
          batch [ Put (Triple "Frenzy" "likes" "Jealousy")
                , Put (Triple "Hate" "loves" "Hatred")
                , Put (Triple "Frenzy" "likes" "Hate")]
                handle
          -- querying the database:
          res <- query (Triple (Just "Frenzy") Nothing Nothing) handle
          -- now, `res :: [Triple Strict.ByteString]`, do something with it...
          -- ...
          -- and clean up:
          close handle

Contributions

The LevelDB Binding is based upon (http://nodejsconfit.levelgraph.io/), which is based upon the idea to build up a hexastore. Freely interpreted.