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

Safe HaskellNone
LanguageHaskell2010

Villefort.Database

Synopsis

Documentation

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

gets list of subjects from local database

path' :: (MonadReader VConfig m, MonadIO m) => m FilePath Source #

get paths tests for --custom flag to allow for executing custom builds

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

connects to database checks if custom database path is set

convRow :: [[SqlValue]] -> [[String]] Source #

converts from sqlValues to Strings

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

takes sqlQuery and returns results as a string

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

executes a query that changes values in database

getNextId :: (MonadReader VConfig m, MonadIO m) => m Integer Source #

gets the task id for the next avaible todo

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

adds new task sanitizes input to avoid SQL escaping

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

logs new daily entry due on same day

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

lists the todo items finished today

clean :: String -> String Source #

rudimentary sanitization