### Description
The `statementTimeout` on RawSQL is not reset after changing a datasource. This causes an error when running SQL and parsing the results for DBs that don't support statement timeout property on the console.
![timeout](https://user-images.githubusercontent.com/11921040/120473505-b6094800-c3c4-11eb-8b00-e43d9ebcb207.gif)
### Affected components
- [x] Console
### Steps to test and verify
- Open /data/manage
- Click on any SQL Server DB.
- Go to Raw SQL
- Run any query
- Verify correct result
GitOrigin-RevId: 8a0adaf308d14db17126953286173da7ef1afc1c
This is a minor refactor (part of `Internal/Parser.hs` is moved into `Internal/Input.hs`) to remove `Collect.hs-boot` and `Directives.hs-boot` files. Without these changes:
1. Most changes would trigger recompilation from the modules with hs-boot files.
1. haskell-language-server fails for some reason in the presence of hs-boot files.
GitOrigin-RevId: 77a2e443417b449c5d7d9d418fc75fcdf076a9ae
adds foreign key functionality to mssql tables under Modify Tab.
Steps to test:
1. Connect an MSSQL data source.
2. Create a table
3. go to modify page
4. make sure the `Add foreign key `button is visible
5. click on `Add foreign key`, and try to add FK
6. after adding the FK, we will see the `edit` and `remove` button, try to edit and remove the FK
Co-authored-by: Vijay Prasanna <11921040+vijayprasanna13@users.noreply.github.com>
GitOrigin-RevId: 63be7c4ef909503ac05096a64c686b72f7c47307
This implements the `snakeCaseTableName` method. It's part of the larger BigQuery PR at https://github.com/hasura/graphql-engine-mono/pull/1317, but @0x777 requested a smaller PR with this change.
GitOrigin-RevId: aeb93c3228bb6ba7293cd73b7a34b39c7ed6139a
Users can delete their default card now. They will not be allowed to do so if they have any billable projects or have an pending dues. (ref cloud PR [#2155](https://github.com/hasura/lux/pull/2155)).
Note: The changes are already live.
GitOrigin-RevId: 80d695698152a94613309b5711851f018941c280
Before: on edit source page, changing data source name was not allowed and the input disabled.
Now: data source name can be changed on edit source page.
Note:
- ~When only the data source name is changed, a request is sent for renaming and another for updating data source even when other values of the data source configuration weren't changed.~
- This has been fixed and should be tested thus:
- run `npm run jest`
- on edit source UI, change only data source name and confirm that only `rename_source` request is being sent through network tab in dev tools
- change any other fields but the source name, and confirm that only `add_source` with `replace_configuration: true` is sent.
- change both source name and any other field in the form and confirm that both request are sent (in this order: rename request before add request) and export_metadata request only sent once after that.
- Try with bigquery, mssql and postgres
Possible Refactor:
- consider if `renameDataSource` and `addDataSource`, can be refactored or left as is
Co-authored-by: Aleksandra Sikora <9019397+beerose@users.noreply.github.com>
GitOrigin-RevId: cbb041ac8362fd94de5aa19bfa61c0cde8703459
### Description
This PR adds `Create Table` view for MSSQL server schemas.
### Changelist
* [x] Add basic `create table` form view on navigating from Schema's create table action.
* [x] Hide frequently selected columns button.
* [x] Allow the user to manually add column types for now: convert `select` for columns to a `text` input .
* [x] Remove `Restrict` radio selection for foreign key constraints.
* [x] Add SQL query for Create table in MSSQL.
### Screenshot
![Screenshot 2021-03-09 at 5 22 03 PM](https://user-images.githubusercontent.com/11921040/110467030-82d45700-80fc-11eb-84af-dd228d84b135.png)
### Changelog
- [x] CHANGELOG.md is updated with user-facing content relevant to this PR. If no changelog is required, then add the no-changelog-required label.
### Modified components
- Console
Co-authored-by: Aleksandra Sikora <9019397+beerose@users.noreply.github.com>
GitOrigin-RevId: a783b5940198ecf582d1cd6ad4d4224efabf59fc
Adding regex expression to test `view`, `table` and `function` routes.
Fixes no highlight issue when clicking on functions in the data tab navigation tree.
GitOrigin-RevId: f278998ec1c98c98e0bfc9cd72d63d673cd74012
Fixes [issue](https://github.com/hasura/graphql-engine/issues/6937)
### Description
The problem lies with the `schemaListSql` for Big Query. Without a region qualifier prefixed, the SQL result contains datasets only US regions, as described in the [docs](https://cloud.google.com/bigquery/docs/information-schema-datasets).
```
If you do not specify a regional qualifier, metadata is retrieved from the us multi-region.
```
The alternative way is to get a list of all available publicly available regions (which is `us` and `europe` atm), for example for europe -
```
SELECT * FROM region-europe.INFORMATION_SCHEMA.SCHEMATA;
```
and then perform `UNION ALL` of the results. This is approached is ditched in favour of the reason that Big Query is read-only on Hasura and new datasets cannot be added from the console (other than by modifying the metadata), we can return the datasets available in the Big Query source's metadata as the possible values of datasets needed by the console to render the data nav tree, thereby avoiding an extra API call in the process.
GitOrigin-RevId: 8117d5698dcc4e7d932362b7cf2e7c8ef34d106a