Add the following dependency to your lakefile.lean
:
import Lake
open System Lake DSL
require Postgres from "../.."
package conn where
@[default_target]
lean_exe conn where
moreLinkArgs := #["-lpq", "-L/opt/homebrew/opt/libpq/lib"]
root := `Main
Requires a running Postgres instance e.G. via Docker:
docker run -d --name postgres -e POSTGRES_PASSWORD=password -v ~/my-volume:/var/lib/postgresql/data -p 5432:5432 postgres
Please find examples in the example folder.
- DDL schema validation
- Insert schema validation