Copyright | (c) 2017 Red Hat Inc. |
---|---|
License | LGPL |
Maintainer | https://github.com/weldr |
Stability | alpha |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
Manage Scripts
records in the database. This record keeps track of a single
script that is associated with a Groups
record. A script is some arbitrary
program that can be run at various points when installing, upgrading, or removing
a piece of software. Not all packaging systems support this concept, and the
BDCS only somewhat supports them at the moment.
Documentation
:: MonadIO m | |
=> Text | The script type (generally, when it runs). This value is highly packaging system dependent. |
-> Text | The script body |
-> Maybe Text | The name of any trigger required to fire off this script. Most scripts do not use this, and many packaging systems do not support it. |
-> Maybe Text | The script version, currently unused |
-> Maybe Int | The script index, currently unused |
-> Maybe Int | The script flags, currently unused |
-> SqlPersistT m (Maybe (Key Scripts)) |
Find a single script in the database, returning the key for that script if it exists. It is possible for multiple very similar scripts to exist in the same database (or even, scripts with identical bodies but that differ in other ways) so additional information must be provided.
getScript :: MonadIO m => Key Scripts -> SqlPersistT m (Maybe Scripts) Source #
Given a key to a Scripts
record in the database, return that record. This function is
suitable for using on the result of findScript
.
insertScript :: MonadIO m => Key Groups -> Scripts -> SqlPersistT m (Key GroupScripts) Source #