You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Once we've defined the tables, we can write queries, e.g.
selectFrom people \{ id, name, age } → do
{ balance } ← leftJoin bankAccounts \b → id .== b.personId
restrict $ id .> lit 1
pure { id, balance }
Generated SQL for the above query:
SELECTpeople_0.idAS id, bank_accounts_1.balanceAS balance
FROM people people_0
LEFT JOIN bank_accounts bank_accounts_1 ON ((people_0.id=bank_accounts_1.personId))
WHERE ((people_0.id>1))
For a more gentle introduction and more examples please refer to the Step-by-Step Guide.
More Help
If you have any questions please don't hesitate to ask.
I'll be happy to help and provide any guidance if necessary.
Open an issue or hit me up directly (either on slack, forum or directly via email).
Introductory Guide: End-to-End example: how to setup, write queries, use aggregation, deal with type errors and execute queries and inserts.
Advanced Guide: Custom Types and Expressions (litPG, Any, EForeign, custom PG functions), more flexible table definitions (Source, db schemas, set-returning functions) - unsafe escape hatches
Test Suite: For information about features, examples, usage, etc. refer to the test suite: Test.Common, Test.PG, Test.SQLite3. To run the tests, docker-compose up -d helps to prepare postgres database.