Copyright | (c) 2014 by Nate Pisarski |
---|---|
License | BSD3 |
Maintainer | nathanpisarski@gmail.com |
Stability | Stable |
Portability | Portable (Cookbook) |
Safe Haskell | Safe |
Language | Haskell98 |
Q2Api is the user-facing part of Quill. It has all the functions necessar to Create, Read, Update, and Delete information from the database, and turn a database back into a Quill-readable string.
- getQuillName :: Quill -> String
- getQuillBody :: Quill -> Element String
- getQuill :: [Quill] -> String -> QuillStatus Quill
- lookUp :: [Quill] -> (String, String) -> QuillStatus String
- removeQuill :: [Quill] -> String -> [Quill]
- removeItem :: [Quill] -> (String, String) -> QuillStatus [Quill]
- addQuill :: [Quill] -> Quill -> [Quill]
- addItem :: [Quill] -> QuillAddition -> QuillStatus [Quill]
- qMap :: QuillStatus [Quill] -> ([Quill] -> QuillStatus [Quill]) -> QuillStatus [Quill]
- changeItem :: [Quill] -> QuillAddition -> QuillStatus [Quill]
- toString :: Quill -> String
Documentation
getQuillName :: Quill -> String Source #
Get the name of a Quill.
getQuillBody :: Quill -> Element String Source #
Return the element of the Quill, specifically useful for lists.
getQuill :: [Quill] -> String -> QuillStatus Quill Source #
Find a quill in the database by name, returning it or a possible error type.
lookUp :: [Quill] -> (String, String) -> QuillStatus String Source #
Look up the value of a Quill TABLE. Will produce an error on a list.
removeItem :: [Quill] -> (String, String) -> QuillStatus [Quill] Source #
Remove an item from a Quill within a database. Works aggressively, meaning it removes all copies to help sanitize QuillMultiples out. th
addItem :: [Quill] -> QuillAddition -> QuillStatus [Quill] Source #
Add a QuillAddition to the databse. QuillAddition is a safe encapsulation of list and table values.
qMap :: QuillStatus [Quill] -> ([Quill] -> QuillStatus [Quill]) -> QuillStatus [Quill] Source #
Map a Quill function.
changeItem :: [Quill] -> QuillAddition -> QuillStatus [Quill] Source #
Change an item within the database using a Quill addition. Wrapper of addItem and removeItem.