beam
beam copied to clipboard
A type-safe, non-TH Haskell SQL library and ORM
From https://github.com/obsidiansystems/beam/commit/1d58f21485e5b95e1edb662d3de26f5d3572289d
## Motivation Currently, there is no way to deal with the database schema purely via Haskell code, which is not good at least because when we define our schema in...
EDIT: The error and relevant code are shown below, however I will highlight the (hopefully) temporary workaround which I am using: ```hs (const $ Beam.val_ True) -- CHANGED THIS (\row...
According to [this](https://stackoverflow.com/questions/3207647/ghc-refuses-to-export-qualified-modules) question this code https://github.com/haskell-beam/beam/blob/4ed616fdd9f0431a8ce634733bd6d43fed05b173/beam-postgres/examples/Pagila/Schema/V0002.hs#L7-L13 re-exports nothing from V0001 module, thus we have no access to datatypes that are declared in V0001 wherever we import `Pagila.Schema` module
beam-core will apparently need code changes: ``` Building library for beam-core-0.9.2.1.. [ 1 of 32] Compiling Database.Beam.Backend.Internal.Compat ( Database/Beam/Backend/Internal/Compat.hs, dist/build/Database/Beam/Backend/Internal/Compat.o, dist/build/Database/Beam/Backend/Internal/Compat.dyn_o ) [ 2 of 32] Compiling Database.Beam.Backend.SQL.Types ( Database/Beam/Backend/SQL/Types.hs,...
In order to add a new extension to `postgres` appears that it is necessary to ```haskell import Database.Beam.Postgres.Extensions import Database.Beam.Postgres.Extensions.Internal ``` however, these modules are hidden. Is this by design?
`DEFAULT` should only be able to appear in the `VALUES` clause of an `INSERT INTO` statement, not in any arbitrary expresion.
`beam` relies very heavily on GHC generics, but the standard GHC generic instances are not appropriate for all use cases (motivating example in this case being [`large-records`](https://hackage.haskell.org/package/large-records)). Fortunately, the way...
This is a proposal to address #367.
Heard there was a major release cycle coming :). This would resolve #491. Note: I used an `unsafeCoerce` to implement these. I think it's fine and the tests pass, but...