graphql-engine/server/src-lib/Hasura
Samir Talwar 15ac52ded4 server: Fix the Analyze feature for SQL Server.
The "Analyze" feature for SQL Server only partially worked. It would show the SQL generated, but not the execution plan. This is because SQL Server doesn't support generating a plan for prepared statements with parameters.

To work around this, we restructure the query as one without parameters. Instead, we replace each parameter with a variable. We declare the variables but don't set values. We then plan _that_, which works.

We run all this in a single query because local variables only last for a single transaction/batch.

This feature does not work for stored procedures.

[NDAT-582]: https://hasurahq.atlassian.net/browse/NDAT-582?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10125
GitOrigin-RevId: a4b45b9b207456ff4fbd1b69b008e93f87346342
2023-08-17 12:51:57 +00:00
..
App Data Connectors Native Queries Support 2023-08-17 02:05:14 +00:00
Backends server: Fix the Analyze feature for SQL Server. 2023-08-17 12:51:57 +00:00
Cache server, pro: actually reformat the code-base using ormolu 2021-09-23 22:57:37 +00:00
Eventing server: change log level to error for triggers in Cloud 2023-08-10 10:04:05 +00:00
Function server: collect remote schema and database introspections while building schema cache 2023-06-01 16:34:31 +00:00
GraphQL Order by nested fields 2023-08-14 06:41:50 +00:00
LogicalModel Data Connectors Native Queries Support 2023-08-17 02:05:14 +00:00
LogicalModelResolver chore(server): Native Query -> Table array relationships 2023-08-14 12:35:53 +00:00
Metadata server: collect remote schema and database introspections while building schema cache 2023-06-01 16:34:31 +00:00
NativeQuery Data Connectors Native Queries Support 2023-08-17 02:05:14 +00:00
QueryTags Remove the last of the obvious Aeson TemplateHaskell 2023-06-28 15:45:09 +00:00
RemoteSchema server/schema-registry: fix metadata resource version -1 for catalog sync 2023-07-17 08:12:31 +00:00
RQL Data Connectors Native Queries Support 2023-08-17 02:05:14 +00:00
Server server: add dynamic labels to Prometheus metric hasura_websocket_messages_sent_bytes_total 2023-08-10 11:53:34 +00:00
Services Upgrade Ormolu to 0.7.0.0 2023-05-24 13:53:53 +00:00
SQL Remove some TemplateHaskell from Hasura.SQL 2023-06-29 10:32:19 +00:00
StoredProcedure chore(server): add track/untrack stored procedure metadata commands to bulk_atomic 2023-08-01 08:15:28 +00:00
Table Data Connectors Native Queries Support 2023-08-17 02:05:14 +00:00
Tracing Add additional tracing spans to HGE GraphQL queries and the Super Connector 2023-05-31 05:49:12 +00:00
App.hs server: change log level to error for triggers in Cloud 2023-08-10 10:04:05 +00:00
ClientCredentials.hs Upgrade Ormolu to 0.7.0.0 2023-05-24 13:53:53 +00:00
CredentialCache.hs server: Make HLint pass, by hook or by crook. 2023-04-25 14:03:02 +00:00
GC.hs server: use lighter GC in ourIdleGC when idle 2023-07-12 09:26:11 +00:00
HTTP.hs Upgrade Ormolu to 0.7.0.0 2023-05-24 13:53:53 +00:00
Logging.hs Remove the last of the obvious Aeson TemplateHaskell 2023-06-28 15:45:09 +00:00
Name.hs feat(server): native Postgres array support 2023-06-28 08:47:59 +00:00
PingSources.hs Fix: Unable to use environment variable for CockroachDB connection string in Cloud 2023-02-14 12:15:58 +00:00
QueryTags.hs Upgrade Ormolu to 0.7.0.0 2023-05-24 13:53:53 +00:00
Services.hs harmonize network manager handling 2023-02-22 15:55:54 +00:00
Session.hs Upgrade Ormolu to 0.7.0.0 2023-05-24 13:53:53 +00:00
ShutdownLatch.hs multitenant: make shutdown logic more abstract 2022-11-23 07:53:19 +00:00
Tracing.hs PLAT-438: improve traces from OpenTelemetry 2023-04-26 16:21:29 +00:00