pg-schema
Use updateSchemaFile function from PgSchema.Generation module to generate type-level definition of database schema. You can make several schemas with any parts of your database. Usually you make executable which imports this module and run it to generate schema definition. You can run it on CI to check if schema definition is up to date. Use PgSchema.DML module to describe and generate (in runtime) safe DML for PostgreSQL. All operations are statically checked and you can't write invalid SQL. With pg-schema you can select or insert/upsert data into tree-like ADT in one request. Let's say we have a database with tables: "orders", "order_positions", "articles". There are articles with ids 41 and 42. We have generated MySch schema with updateSchemaFile function from PgSchema.Generation module. Then we can write a function to insert an order with order positions. And select orders with order positions and articles in one request using some conditions for orders and order positions that return in order. PgSchema.Generation - module with generation functions. Usually you make executable which generates schema definition using this module. PgSchema.DML - module with DML functions. Import this module into your application and use it to generate safe DML for PostgreSQL. PgSchema.Import - generated schema module imports this module.
hackage.haskell.org
0.5.2.0
1 day ago
4
5 total
Past Dependents
Check this option to include packages that no longer depend on this package in their latest version but previously did.
Filter
Filter by Kind
Links
| Registry | hackage.haskell.org |
| Source | Repository |
| Homepage | Homepage |
| JSON API | View JSON |
| CodeMeta | codemeta.json |
Package Details
Repository
| Stars | 4 on GitHub |
| Forks | 5 on GitHub |