mirror of
https://github.com/khibino/haskell-relational-record.git
synced 2025-01-05 20:04:49 +03:00
Add document.
This commit is contained in:
parent
d92fc81b1f
commit
64381c8142
@ -61,11 +61,15 @@ defineHasPrimaryKeyInstance :: TypeQ -> Int -> Q [Dec]
|
||||
defineHasPrimaryKeyInstance =
|
||||
defineHasKeyConstraintInstance [t| Primary |]
|
||||
|
||||
defineHasPrimaryKeyInstanceDefault :: String -> Int -> Q [Dec]
|
||||
defineHasPrimaryKeyInstanceDefault :: String -- ^ Table name
|
||||
-> Int -- ^ Primary key index
|
||||
-> Q [Dec] -- ^ Declaration of primary key constraint
|
||||
defineHasPrimaryKeyInstanceDefault =
|
||||
defineHasPrimaryKeyInstance . recordTypeDefault
|
||||
|
||||
defineHasNotNullKeyInstanceDefault :: String -> Int -> Q [Dec]
|
||||
defineHasNotNullKeyInstanceDefault :: String -- ^ Table name
|
||||
-> Int -- ^ Not null key index
|
||||
-> Q [Dec] -- ^ Declaration of not null key constraint
|
||||
defineHasNotNullKeyInstanceDefault =
|
||||
defineHasNotNullKeyInstance . recordTypeDefault
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user