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

Adapter quoting should use self.Relation.quote_character #2243

Closed
beckjake opened this issue Mar 25, 2020 · 2 comments
Closed

Adapter quoting should use self.Relation.quote_character #2243

beckjake opened this issue Mar 25, 2020 · 2 comments
Labels
adapter_plugins Issues relating to third-party adapter plugins enhancement New feature or request stale Issues that have gone stale

Comments

@beckjake
Copy link
Contributor

Describe the feature

Currently adapters each have to implement a quote method that returns a quoted form of the given identifier. But adapter plugins already define a Relation class that has a quote_character, which is associated with the adapter. The base adapter should implement a default quote that just does ''.join([self.Relation.quote_character, value, self.Relation.quote_character]) or similar.

Describe alternatives you've considered

Adapters can effectively define quote characters twice.

Additional context

All databases,sort of

Who will this benefit?

Plugin developers

@beckjake beckjake added enhancement New feature or request triage labels Mar 25, 2020
@drewbanin drewbanin removed the triage label Mar 25, 2020
@drewbanin drewbanin added this to the Octavius Catto milestone Mar 25, 2020
@drewbanin drewbanin modified the milestones: Octavius Catto, dbt-next Apr 29, 2020
@jtcohen6 jtcohen6 removed this from the Marian Anderson milestone Jul 6, 2020
@jtcohen6 jtcohen6 added the adapter_plugins Issues relating to third-party adapter plugins label Jul 29, 2020
@jtcohen6
Copy link
Contributor

Adapters also have to implement their quote character again for columns by overriding the quoted method on the Column class. Ideally, we'd have a single place for an adapter to define its quote character, which is then reused across Relation.quote_character, Column.quoted, and adapter.quote().

@github-actions
Copy link
Contributor

github-actions bot commented Dec 2, 2021

This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please remove the stale label or comment on the issue, or it will be closed in 7 days.

@github-actions github-actions bot added the stale Issues that have gone stale label Dec 2, 2021
@github-actions github-actions bot closed this as completed Dec 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
adapter_plugins Issues relating to third-party adapter plugins enhancement New feature or request stale Issues that have gone stale
Projects
None yet
Development

No branches or pull requests

3 participants