Copyright | (c) 2016-2017 Red Hat Inc. |
---|---|
License | LGPL |
Maintainer | https://github.com/weldr |
Stability | alpha |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
- associateBuildWithPackage :: MonadIO m => Key Builds -> Key KeyVal -> SqlPersistT m (Key BuildKeyValues)
- findBuild :: MonadIO m => Int -> Text -> Text -> Key Sources -> SqlPersistT m (Maybe (Key Builds))
- getBuild :: MonadIO m => Key Builds -> SqlPersistT m (Maybe Builds)
- insertBuild :: MonadIO m => Builds -> SqlPersistT m (Key Builds)
- insertBuildKeyValue :: MonadIO m => KeyType -> Text -> Maybe Text -> Key Builds -> SqlPersistT m (Key BuildKeyValues)
Documentation
associateBuildWithPackage :: MonadIO m => Key Builds -> Key KeyVal -> SqlPersistT m (Key BuildKeyValues) Source #
Create a link in the database between an existing Builds
record and an existing KeyVal
record. This is different from insertBuildKeyValue
, which also creates the KeyVal
record.
A single build can potentially have zero or many KeyVal
pairs associated with it. On the
other hand, a single KeyVal
pair can apply to many builds.
The database key of the new link is returned.
:: MonadIO m | |
=> Int | Epoch (usually, 0) |
-> Text | Release |
-> Text | Hardware architecture |
-> Key Sources | Reference to a |
-> SqlPersistT m (Maybe (Key Builds)) |
Find a single build of a software package in the database, returning the database key
for that build if it exists. All arguments are required and must be matched for this
function to return anything. Note that conceptually, a build is of some software source
which is why a key to a Sources
record is required.
insertBuild :: MonadIO m => Builds -> SqlPersistT m (Key Builds) Source #
Conditionally add a new Builds
record to the database. If the record already exists,
return its key. Otherwise, insert the record and return the new key.