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

Feedback on ROM - Queries #364

Open
janko opened this issue Dec 3, 2017 · 4 comments
Open

Feedback on ROM - Queries #364

janko opened this issue Dec 3, 2017 · 4 comments

Comments

@janko
Copy link
Contributor

janko commented Dec 3, 2017

First of all, the documentation for ROM is excellent! 👏 (both RDocs and guides)

The Projecting function results section inside the "SQL - Queries" guide shows adding function calls to the SQL query using this syntax:

int::count(...)
string::concat(...)

However, I couldn't find any clarification on this neither here nor in the rom-sql RDocs. I know that that this syntax is used for the SQL builder to know when you're adding a function call and when a column identifier (as both are method calls). But it would be great to have an explanation somewhere what are the typed int:: and string:: "namespaces" for, as I'm wondering why isn't there just a single function:: "namespace" 😃

@solnic
Copy link
Member

solnic commented Dec 4, 2017

Right, this should be documented. The reason why we require return type, is because we're inferring structs automatically, and we want to know both attribute names and their types.

@solnic
Copy link
Member

solnic commented Dec 7, 2017

One more thing, we have Any type, so it is possible to add a generic function builder that doesn't require return type, like the function:: syntax you proposed. WDYT @flash-gordon?

@flash-gordon
Copy link
Member

@solnic sounds like a nice idea. I think we could have fun for brevity.

@solnic
Copy link
Member

solnic commented Dec 8, 2017

👉🏻 #270 👈🏻

@solnic solnic transferred this issue from rom-rb/rom-rb.org Jan 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants