aboutsummaryrefslogtreecommitdiff
path: root/guix-data-service/model/utils.scm
Commit message (Collapse)AuthorAge
* Improve error handling for insert-missing-data-and-return-all-idsChristopher Baines2019-09-05
|
* Support deleting duplicates in insert-missing-data-and-return-all-idsChristopher Baines2019-09-05
| | | | | | This is useful when you want to pass in data with some duplicates, and get back a list of ids, where the duplicate entries are represented by the same id.
* Start handling ids as numbers, rather than stringsChristopher Baines2019-09-05
| | | | | | | | | squee, returns all data as strings, and expects strings as inputs to queries. So, keeping the ids as strings was easy initially, but it means that you can't tell from the type whether it should be quoted, or not... Therefore, handle ids as strings, converting them to numbers when they're fetched from the database, and back to strings as part of the queries.
* Improve insert-missing-data-and-return-all-idsChristopher Baines2019-09-04
| | | | | | Use exec-query-with-null-handling to distinguish NULL values, change it to just take a list of fields and remove the handlers. Also, add a sets-of-data? parameter so that this can be used licenses.
* Change normalise-database-values to normalise-valuesChristopher Baines2019-09-02
| | | | As these values are not from the database, which is why they're not strings.
* Add insert-missing-data-and-return-all-ids to the model utils moduleChristopher Baines2019-08-31
| | | | | This should help greatly with populating the database with new entries, and greatly reduce code duplication.
* Use $STR$ for better quoting in quote-stringChristopher Baines2019-08-31
|
* Add value->sql-boolean to (guix-data-service model utils)Christopher Baines2019-08-31
|
* Fix some duplicated values in tablesChristopher Baines2019-08-04
| | | | | | | | | | | | | The licenses table, along with the package_metadata table had duplicate values. This could happen as the unique constraints on those tables didn't properly account for the nullable fields. The duplicates in those tables also affected the license_sets, packages, package_derivations tables in a similar way. Finally, the guix_revision_package_derivations table was also affected. This commit adds a migration to fix the data, as well as the constraints. THe code to populate the licenses and package_metadata tables is also updated.
* Add a utility to group list valuesChristopher Baines2019-05-18
| | | | This is useful for some queries with duplicated parts of the results.
* Remove redundant lambda from deduplicate-stringsChristopher Baines2019-03-24
|
* Extract out deduplicate-strings to the utils moduleChristopher Baines2019-03-24
|
* Improve the model for derivationsChristopher Baines2019-02-10
| | | | | | These changes mean that more information about derivations is recorded. There are a number of corresponding changes in the database schema that are not tracked in the repository unfortunately.
* Initial commitChristopher Baines2019-02-07
This is a service designed to provide information about Guix. At the moment, this initial prototype gathers up information about packages, the associated metadata and derivations. The initial primary use case is to compare two different revisions of Guix, detecting which packages are new, no longer present, updated or otherwise different. It's based on the Mumi project. [1]: https://git.elephly.net/software/mumi.git