<commit_before>module Database.LevelDB
       (
       ) where<commit_msg>Intermittent work<commit_after>-- |
-- Module      : Database.LevelDB
-- Copyright   : (c) <NAME> 2012
-- License     : BSD3
-- 
-- Maintainer  : <EMAIL>
-- Stability   : experimental
-- Portability : portable
-- 
-- This module provides a moderately high level interface to Google's
-- LevelDB (<http://leveldb.googlecode.com>).
-- 
-- It's based on the C API, and thus doesn't quite offer the entire
-- interface, but it gets close.
-- 
module Database.LevelDB
       (
         -- * Types
         Snapshot
       , Compression(..)
       , DBOptions(..)
       , ReadOptions(..)
       , WriteOptions(..)

         -- * Opening/closing databases

         -- * Basic interface

         -- * Batched writes

         -- * Iterators

         -- * Snapshots

         -- * Destroying/Repairing databases

         -- * Database properties

       ) where

#include <leveldb/c.h>

data Snapshot
  
data Compression
  = Snappy
  | None
  deriving (Eq, Show)

-- | Options for creating a database.
data DBOptions
  = DBOptions { -- dbComparator          :: ...
                dbCreateIfMissing     :: Bool
              , dbErrorIfExists       :: Bool
              , dbParanoidChecks      :: Bool
              --, dbInfoLog             :: Bool
              , dbWriteBufferSize     :: Int
              , dbMaxOpenFiles        :: Int
              , dbCacheCapacity       :: Int
              , dbBlockSize           :: Int
              , dbBlockResizeInterval :: Int
              , dbCompression         :: Compression
              }
  deriving (Show)

-- | Options for issuing reads from the database.
data ReadOptions
  = ReadOptions { readVerifyChecksums :: Bool
                , readFillCache       :: Bool
                , readSnapshot        :: Snapshot
                }

-- | Options specified when issuing writes on the database.
-- Right now, you can just control whether or not you should
-- sync the filesystem after every write.
data WriteOptions
  = WriteOptions { writeWithSync :: Bool
                 }

{'fraction_non_alphanumeric': 0.09747979077508322, 'fraction_numerical': 0.0023775558725630053, 'mean_word_length': 1.541062801932367, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5596845', 'n_tokens_mistral': 575, 'n_tokens_neox': 543, 'n_words': 157}