sad_spirit/pg_gateway
The Table Data Gateway serves as a gateway to a table
in the database, it provides methods that mirror the most common table operations (delete(), insert(),
select(), update()) and encapsulates SQL code that is needed to actually perform these operations.
As pg_gateway is built upon pg_wrapper
and pg_builder packages it does not provide database abstraction,
only targeting Postgres. This allows leveraging its strengths like rich type system and expressive SQL syntax while
maybe sacrificing some flexibility.
Contents:
- Overview
- Tutorial
TableLocatorclass- Gateways
- Default query builder
- Configuring complex Fragments
- Transforming the generated
SELECT - How to create custom builders
- How to create custom gateways
- How to map query results to DTOs
- Query Fragments: base concepts
- Query Fragments: implementations
FragmentListbuilders\FragmentListBuilderfragments\CustomFragment,fragments\CustomSelectFragmentfragments\ParametrizedFragmentfragments\ClosureFragmentfragments\InsertSelectFragmentfragments\SetClauseFragmentfragments\WhereClauseFragmentandfragments\HavingClauseFragmentfragments\TargetListFragmentand its subclassesfragments\JoinFragmentfragments\LimitClauseFragmentandfragments\OffsetClauseFragmentfragments\OrderByClauseFragmentfragments\WithClauseFragment
- Conditions
- Factory interfaces and classes
- Mapping OIDs to table names
- Accessing table metadata