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 use labels as names for sql select fields #29

Open
sgunnzero opened this issue May 21, 2014 · 3 comments
Open

Option to use labels as names for sql select fields #29

sgunnzero opened this issue May 21, 2014 · 3 comments

Comments

@sgunnzero
Copy link

Have just started using RedQueryBuilder, quite impressed. The form I'm using it in returns a table of results. I'd really like the column names to be the labels supplied, rather than the database field names. This could be accomplished by adding an AS clause to the select fields - e.g.

SELECT x0.db_column_name AS MyLabel

I'm going to manually add them to the sql in onSqlChange, but it would be nice if it was automated.

Thanks, Stuart

@salk31
Copy link
Owner

salk31 commented May 21, 2014

Hello,

Are you using the JS version? For better or worse it is sort of hardwired in there.

At some point I'd like to support self joins, would you have any preference on what labels might be used then?

@sgunnzero
Copy link
Author

Hi,

Yes, the JS version. No opinion on self joins. I ended up storing the sql twice - one in a basic form that redquerybuilder could load, and one in a converted form including AS fields and some extra joins.

Thanks, Stuart

@salk31
Copy link
Owner

salk31 commented May 23, 2014

OK. I think I'll cast this as a feature request to have proper control over the "SELECT" part of the query, generally RQB doesn't do much in this area. Is for the developer.

Please scream if that is an abuse of this ticket.

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

2 participants