Ecosyste.ms: Packages

An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

hackage.haskell.org : servant-util-beam-pg

[Last Documentation] Package maintainers For package maintainers and hackage trustees Candidates This package contains backend implementation for API combinators of servant-util package via 'beam-postgres'. Run stack build servant-util-beam-pg to build everything. We will demonstrate this on the previously shown example: Let's assume that Book definition is extended to a Beam table (this is not necessary, but simplifies our example): Implementation will look like Function sortingApp specifies how to correlate user-provided specification with fields of our table. For each field which we allow to sort on, we specify a Beam field from the table. If one of the fields lacks such specification in sortingApp definition or order of fields is incorrect then compile error is raised. The same happens when field types in API and schema definition mismatch. Annotating fieldSort calls with a field name is fully optional but may save you in case when several fields of the same type participate in sorting; this also improves readability. Filtering is implemented pretty much like sorting. Let's consider the previously shown example: Implementation can look like Again, for each possible user-provided filter you have to provide an implementation. Automatic filters require only a corresponding field of response, they will apply the required operation to it themselves. On the other hand, manual filters carry the value that user provides, and you implement the predicate on this value. Again, type annotations in filterOn and manualFilter calls are optional. Pagination can be applied simply with paginate_ function. Please see CONTRIBUTING.md for more information. Servant-util is maintained and funded with ❤️ by Serokell. The names and logo for Serokell are trademark of Serokell OÜ. We love open source software! See our other projects or hire us to design, develop and grow your idea!

Registry - Source - Homepage - JSON
purl: pkg:hackage/servant-util-beam-pg
Keywords: database, library, mpl, program, servant, web
License: MPL-2.0
Latest release: over 1 year ago
First release: almost 3 years ago
Dependent repositories: 1
Downloads: 624 total
Stars: 33 on GitHub
Forks: 9 on GitHub
Total Commits: 124
Committers: 14
Average commits per author: 8.857
Development Distribution Score (DDS): 0.298
More commit stats: commits.ecosyste.ms
See more repository details: repos.ecosyste.ms
Last synced: 2 days ago

    Loading...
    Readme
    Loading...