PromucFlow_constructor/app/server/appsmith-plugins
Naveen Goud cbd7ccc4ec
fix: updated the regex expression to correctly identify the table nam… (#35361)
**Description**

When the user tries to add a postgres datasource and add any query, if
the table name has hyphens in it, then quotes get assigned to first word
after the schema and the dot. For example, public."counter"-with-db
The quotes should be applied to the whole table name. For example:
public."counter-with-db"

Fixes https://github.com/appsmithorg/appsmith/issues/10631
Fixes https://github.com/appsmithorg/appsmith/issues/30692

**changes in PR:**

1.updated the regec expression to idetify the table name properly with
table name consists of hypens.

2.added a test case for this scenario.

**snapshots:**
before:

![Screenshot from 2024-07-30
17-15-27](https://github.com/user-attachments/assets/98f969da-4cf1-4367-be29-1f3465179a9d)

After:

![Screenshot from 2024-08-01
10-46-53](https://github.com/user-attachments/assets/29411eb7-77af-4a10-9988-a0c076043945)


Hi @ajinkyakulkarni @rohan-arthur @Nikhil-Nandagopal ,Please review this
PR.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

## Summary by CodeRabbit

- **New Features**
- Enhanced handling of table names in the Postgres plugin to support a
wider variety of characters, including hyphens and special characters.
- Introduced multiple new database tables for improved testing coverage.

- **Bug Fixes**
- Adjusted table name processing to correctly format names containing a
broader range of characters.

- **Tests**
- Added new tests to verify the structure and integrity of tables with
various naming conventions.
	- Expanded existing tests to accommodate additional table structures.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-08-27 16:21:12 +05:30
..
amazons3Plugin chore: added prettier spotless plugin for json files (#35447) 2024-08-08 09:16:03 +05:30
anthropicPlugin feat: Action redesign: updated Anthropic plugin config (#35754) 2024-08-23 08:35:12 +05:30
appsmithAiPlugin chore: added prettier spotless plugin for json files (#35447) 2024-08-08 09:16:03 +05:30
arangoDBPlugin chore: added prettier spotless plugin for json files (#35447) 2024-08-08 09:16:03 +05:30
awsLambdaPlugin chore: added prettier spotless plugin for json files (#35447) 2024-08-08 09:16:03 +05:30
databricksPlugin chore: added prettier spotless plugin for json files (#35447) 2024-08-08 09:16:03 +05:30
dynamoPlugin chore: added prettier spotless plugin for json files (#35447) 2024-08-08 09:16:03 +05:30
elasticSearchPlugin Revert "chore: added JSON files linting check" (#35445) 2024-08-06 14:15:23 +05:30
firestorePlugin chore: added prettier spotless plugin for json files (#35447) 2024-08-08 09:16:03 +05:30
googleAiPlugin chore: added prettier spotless plugin for json files (#35447) 2024-08-08 09:16:03 +05:30
googleSheetsPlugin chore: added prettier spotless plugin for json files (#35447) 2024-08-08 09:16:03 +05:30
graphqlPlugin Revert "chore: added JSON files linting check" (#35445) 2024-08-06 14:15:23 +05:30
jsPlugin chore: Applied Spotless formatter (#25173) 2023-07-07 00:43:11 +05:30
mongoPlugin Revert "feat: Action redesign: Updating Mongo plugin form config" (#35903) 2024-08-27 15:48:46 +05:30
mssqlPlugin chore: added prettier spotless plugin for json files (#35447) 2024-08-08 09:16:03 +05:30
mysqlPlugin chore: added prettier spotless plugin for json files (#35447) 2024-08-08 09:16:03 +05:30
openAiPlugin chore: added prettier spotless plugin for json files (#35447) 2024-08-08 09:16:03 +05:30
oraclePlugin chore: added prettier spotless plugin for json files (#35447) 2024-08-08 09:16:03 +05:30
postgresPlugin fix: updated the regex expression to correctly identify the table nam… (#35361) 2024-08-27 16:21:12 +05:30
redisPlugin chore: added prettier spotless plugin for json files (#35447) 2024-08-08 09:16:03 +05:30
redshiftPlugin chore: added prettier spotless plugin for json files (#35447) 2024-08-08 09:16:03 +05:30
restApiPlugin Revert "chore: added JSON files linting check" (#35445) 2024-08-06 14:15:23 +05:30
saasPlugin fix: graphQL bindings issue resolved (#32760) 2024-04-18 17:36:54 +05:30
smtpPlugin chore: added prettier spotless plugin for json files (#35447) 2024-08-08 09:16:03 +05:30
snowflakePlugin chore: added prettier spotless plugin for json files (#35447) 2024-08-08 09:16:03 +05:30
pom.xml test: Add AssertJ for plugins, for better assertions (#31380) 2024-03-04 07:33:45 +05:30