Villefort-0.1.2.14: Villefort is a task manager and time tracker

Safe HaskellNone
LanguageHaskell2010

Villefort.Database

Synopsis

Documentation

makeQuery :: (MonadReader VConfig m, MonadIO m) => String -> m [[String]] Source #

takes sqlQuery and returns results as a string

getSubjects :: (MonadReader VConfig m, MonadIO m) => m [String] Source #

gets list of subjects from local database

execQuery :: (Convertible a SqlValue, MonadIO m, MonadReader VConfig m) => String -> [a] -> m () Source #

executes a query that changes values in database

addDaily :: (MonadReader VConfig m, MonadIO m) => [String] -> m () Source #

logs new daily entry due on same day

clean :: String -> String Source #

rudimentary sanitization

getDone :: (MonadReader VConfig m, MonadIO m) => m [[String]] Source #

lists the todo items finished today

getDb :: (MonadReader VConfig m, MonadIO m) => m Connection Source #

connects to database checks if custom database path is set

addTask :: (MonadReader VConfig m, MonadIO m) => String -> String -> String -> String -> m () Source #

adds new task sanitizes input to avoid SQL escaping