Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add driver for snowflake/mysql #66

Merged
merged 7 commits into from
Feb 27, 2025
Merged

add driver for snowflake/mysql #66

merged 7 commits into from
Feb 27, 2025

Conversation

u110
Copy link
Collaborator

@u110 u110 commented Feb 20, 2025

This pull request includes changes to the connection resource to support additional database drivers and improve the handling of the driver field. The most important changes include updating the documentation, modifying the CreateConnectionInput and UpdateConnectionInput structs, and enhancing the schema for the driver field.

Support for additional database drivers:

  • docs/resources/connection.md: Updated the driver field description to include support for Snowflake and MySQL drivers, in addition to PostgreSQL. Added possible values for each database type.

Handling of the driver field:

@u110 u110 force-pushed the driver-for-snowflake-mysql branch from 7fd1453 to 5d7fdbe Compare February 21, 2025 01:04
@u110 u110 marked this pull request as ready for review February 21, 2025 01:39
@@ -569,10 +569,28 @@ func (r *connectionResource) Schema(

// PostgreSQL Fields
"driver": schema.StringAttribute{
MarkdownDescription: "PostgreSQL: The name of a PostgreSQL driver.",
Optional: true,
MarkdownDescription: strings.Join(
Copy link
Collaborator

@okeyaki okeyaki Feb 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO: It's better to use multiline string syntax.

MarkdownDescription: `
	Snowflake, MySQL, PostgreSQL: The name of a Database driver. Possible values are:
		- MySQL: null, mysql_connector_java_5_1_49
		- Snowflake: null, snowflake_jdbc_3_14_2, snowflake_jdbc_3_17_0
		- PostgreSQL: postgresql_42_5_1, postgresql_9_4_1205_jdbc41
`

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

// PostgreSQL
"postgresql_42_5_1",
"postgresql_9_4_1205_jdbc41",
),
},
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ASK: Is it necessary to validate the combination of driver and connection type?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thx!

@u110 u110 force-pushed the driver-for-snowflake-mysql branch from 3947107 to a18ee95 Compare February 24, 2025 06:22
@u110 u110 requested a review from okeyaki February 25, 2025 20:39
@u110 u110 merged commit 28dda91 into main Feb 27, 2025
6 checks passed
@u110 u110 deleted the driver-for-snowflake-mysql branch February 27, 2025 02:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants