graphql-engine/server/src-lib/Hasura/Backends/Postgres/Translate
Vladimir Ciobanu da8f6981d4 server: reduce the number of backend dispatches
Fixes https://github.com/hasura/graphql-engine-mono/issues/712

Main point of interest: the `Hasura.SQL.Backend` module.

This PR creates an `Exists` type indexed by indexed type and packed constraint while hiding all of its complexity by not exporting the constructor.

Existential constructors/types which are no longer (directly) existential:
- [X] BackendSourceInfo :: BackendSourceInfo
- [x] BackendSourceMetadata :: BackendSourceMetadata
- [x] MOSourceObjId :: MetadatObjId
- [x] SOSourceObj :: SchemaObjId
- [x] RFDB :: RootField
- [x] LQP :: LiveQueryPlan
- [x] ExecutionStep :: ExecStepDB

This PR also removes ALL usages of `Typeable.cast` from our codebase. We still need to derive `Typeable` in a few places in order to be able to derive `Data` in one place. I have not dug deeper to see why this is needed.

GitOrigin-RevId: bb47e957192e4bb0af4c4116aee7bb92f7983445
2021-03-15 13:03:55 +00:00
..
BoolExp.hs server: reduce the number of backend dispatches 2021-03-15 13:03:55 +00:00
Column.hs server: generalize schema cache building (#496) 2021-02-14 06:08:46 +00:00
Delete.hs server: remove a few unused Lift instances (#114) 2020-11-26 13:58:07 +00:00
Insert.hs server: remove a few unused Lift instances (#114) 2020-11-26 13:58:07 +00:00
Mutation.hs server: generalize schema cache building (#496) 2021-02-14 06:08:46 +00:00
Returning.hs [Preview] Inherited roles for postgres read queries 2021-03-08 11:15:10 +00:00
Select.hs [Preview] Inherited roles for postgres read queries 2021-03-08 11:15:10 +00:00
Types.hs server: generalize schema cache building (#496) 2021-02-14 06:08:46 +00:00
Update.hs server: schema that grows (#105) 2020-12-01 15:51:13 +00:00