Generic operations and integrity tests to support the database code generated from ERDs
showDatabaseKey
:: String -> (a -> Int) -> a -> String Shows a database key for an entity name as a string. |
readDatabaseKey
:: String -> (Int -> a) -> String -> Maybe a Transforms a string into a key for an entity name. |
newEntry
:: Show a => (Int -> a -> Dynamic) -> (Int -> a -> b) -> a -> Transaction b Insert a new entity and assign a new key for it. |
newEntryR
:: (Show a, Show b) => (Int -> (a,b) -> Dynamic) -> a -> b -> Transaction () |
getEntry
:: (Read a, Show a) => (Int -> a -> Dynamic) -> (Int -> a -> b) -> Int -> Transaction b |
deleteEntryR
:: (Eq a, Read a, Show a, Eq b, Read b, Show b) => (Int -> (a,b) -> Dynamic) -> a -> b -> Transaction () |
existsEntryWithDBKey
:: (Read a, Show a) => String -> (Int -> a -> Dynamic) -> Int -> Transaction () |
requiredForeignDBKey
:: (Read a, Show a, Eq b, Show b) => String -> (Int -> a -> Dynamic) -> (Int -> a -> c) -> (c -> b) -> b -> Transaction () |
getAllEntities
:: (Read a, Show a) => (Int -> a -> Dynamic) -> (Int -> a -> b) -> Query [b] |
duplicateKeyTest
:: (Int -> a -> Dynamic) -> Transaction () |
duplicatePTest
:: Eq a => [a] -> Transaction () |
unique
:: (Read a, Show a, Eq b, Show b) => String -> (Int -> a -> Dynamic) -> (Int -> a -> c) -> (c -> b) -> b -> Transaction () |
uniqueUpdate
:: (Read a, Show a, Eq b, Show b) => String -> (Int -> a -> Dynamic) -> (Int -> a -> c) -> (c -> Int) -> (c -> b) -> c -> Transaction () |
uniqueC
:: (Read a, Show a, Eq b, Show b) => String -> (Int -> a -> Dynamic) -> (Int -> a -> c) -> (c -> b) -> c -> Transaction () |
unique2
:: (Eq a, Read a, Show a, Eq b, Read b, Show b) => (Int -> (a,b) -> Dynamic) -> a -> b -> Transaction () |
unique2C
:: (Eq a, Read a, Show a, Eq b, Read b, Show b) => (Int -> (a,b) -> Dynamic) -> a -> b -> Transaction () |
maxPTest
:: Int -> [a] -> Transaction () |
maxTest
:: (Read a, Show a, Eq b, Show b) => String -> (Int -> a -> Dynamic) -> (Int -> a -> c) -> (c -> b) -> Int -> b -> Transaction () |
maxTestUpdate
:: (Read a, Show a, Eq b, Show b) => String -> (Int -> a -> Dynamic) -> (Int -> a -> c) -> (c -> Int) -> (c -> b) -> Int -> c -> Transaction () |
maxTestC
:: (Read a, Show a, Eq b, Show b) => String -> (Int -> a -> Dynamic) -> (Int -> a -> c) -> (c -> b) -> Int -> b -> Transaction () |
minTestC
:: (Read a, Show a, Eq b, Show b) => String -> (Int -> a -> Dynamic) -> (Int -> a -> c) -> (c -> b) -> Int -> b -> Transaction () |
maxTestInsert
:: (Read a, Show a, Eq b, Show b) => String -> (Int -> a -> Dynamic) -> (Int -> a -> c) -> (c -> b) -> Int -> b -> Transaction () |
minTestDelete
:: (Read a, Show a, Eq b, Show b) => String -> (Int -> a -> Dynamic) -> (Int -> a -> c) -> (c -> b) -> Int -> b -> Transaction () |
saveDBTerms
:: (Read a, Show a, Show b) => String -> String -> (Int -> a -> Dynamic) -> (Int -> a -> b) -> IO () |
restoreDBTerms
:: (Show a, Read b) => String -> String -> (Int -> a -> Dynamic) -> (b -> Int) -> (b -> a) -> IO () |
restoreDBRelTerms
:: (Show a, Read b) => String -> String -> (Int -> a -> Dynamic) -> (b -> a) -> IO () |
defaultString
:: String -> String -> String |
The general type of database keys.
Type synonym: Key = Int
Shows a database key for an entity name as a string. Useful if a textual representation of a database key is necessary, e.g., as URL parameters in web pages. This textual representation should not be used to store database keys in attributes! |
Transforms a string into a key for an entity name. Nothing is returned if the string does not represent a reasonable key. |
Insert a new entity and assign a new key for it. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|