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 db-specific quoting for non-simple names in AbstractJbdcSource #1833

Merged
merged 3 commits into from
Jan 28, 2021

Conversation

cgardens
Copy link
Contributor

@cgardens cgardens commented Jan 26, 2021

What

closes #1818
closes #1816

  • AbstractJdbcSource did not handle tables and columns with non alphanumeric characters (e.g. spaces, ., etc)

How

  • Add db-specific quoting to support these cases

I am not particularly interested in merging this before the launch. We can launch after. (unless any reviewer particularly want it right now.)

Copy link
Contributor

@michel-tricot michel-tricot left a comment

Choose a reason for hiding this comment

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

Looks good.

* @return quoted identifier
* @throws SQLException throws if there are any issues fulling the quoting metadata from the db.
*/
public static String enquoteIdentifier(Connection connection, String identifier) throws SQLException {
Copy link
Contributor

Choose a reason for hiding this comment

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

why not call it quoteIdentifier?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i was matching the names that jdbc uses. no preference though. quoteIdentifier works for me.

Copy link
Contributor

Choose a reason for hiding this comment

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

If you're following an existing convention, let's stick to it.

* @return quoted identifiers
* @throws SQLException throws if there are any issues fulling the quoting metadata from the db.
*/
public static String enquoteIdentifierList(Connection connection, List<String> identifiers) throws SQLException {
Copy link
Contributor

Choose a reason for hiding this comment

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

same

@cgardens cgardens force-pushed the cgardens/mysql_quoting branch 2 times, most recently from e463fa7 to 1439eaa Compare January 28, 2021 23:41
@cgardens cgardens merged commit c34bcd2 into master Jan 28, 2021
@cgardens cgardens deleted the cgardens/mysql_quoting branch January 28, 2021 23:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants