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

Option to treat namespace-qualified keywords as table.column #249

Closed
seancorfield opened this issue Sep 8, 2019 · 0 comments
Closed

Option to treat namespace-qualified keywords as table.column #249

seancorfield opened this issue Sep 8, 2019 · 0 comments

Comments

@seancorfield
Copy link
Owner

Now that the default behavior of namespace-qualified keywords has been restored to the pre-0.9.0 behavior, it would probably make sense to introduce a new option to treat such keywords as :table.column which would be a better map for dealing with next.jdbc and libraries like seql.

So there would be three behaviors:

  • default: turn :table/column into just column -- the behavior in 0.9.7 and prior to 0.9.0,
  • :allow-namespaced-names? true: turn :table/column into table/column and assume the user knows what they're doing and is also quoting names (I think this is odd behavior but @jrdoane introduced it so I'll assume he -- and possibly others -- are relying on this),
  • (some new option): turn :table/column into table.column so namespace-qualified keys would become a first-class citizen and would round-trip as expected when using next.jdbc (and seql etc).

Note that next.jdbc.sql's behavior for namespace-qualified keys matches HoneySQL 0.9.7 (and pre-0.9.0): the namespace portion is simply discarded -- which makes sense for the very simple queries that it attempts to generate. next.jdbc's primary API traffics in SQL strings where it's up to the user to deal with aliases and table names etc.

I think a good name for the new option would be :namespace-as-table?

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

No branches or pull requests

1 participant