Frames-beam-0.2.0.0: A library for accessing Postgres tables as in-memory data structures.

Safe HaskellNone
LanguageHaskell2010

Frames.SQL.Beam.Postgres.BeamSchemaGen

Description

Functions that help generate Beam schema at compile time.

Synopsis

Documentation

genBeamSchema :: ByteString -> Q [Dec] Source #

Takes code generated by getCode and puts it in a file named "NewBeamSchema.hs" in the src directory (relative to your project's root) at compile time.

genBeamSchemaForTests :: ByteString -> Q [Dec] Source #

Takes code generated by getCode and puts it in a file named "NewBeamSchema.hs" in the test directory (relative to your project's root) at compile time. Used internally in the test suite.

getCode :: ByteString -> IO String Source #

Generates Beam code for a schema corresponding to the postgres database referred to in the connection string.