List only the valid field names on for SOQL

Issue #264 wontfix
Jay Janarthanan created an issue

How about we list the field names next to the SOQL window.

DescribeSObjectResult describeResult = Account.getSObjectType().getDescribe();

List<String> fieldNames = new List<String>( describeResult.fields.getMap().keySet() );

That should get you the field names

Comments (2)

  1. Scott Wells repo owner

    Jay, I'm not sure I understand what you're asking for. I have the list of valid field names for each object already as part of the stub Apex classes for SObjects in the OST. Those are provided in completion. Are you asking if I could put those in a list on the side of the SOQL query tool window for reference?

    Perhaps related, what I am considering doing at some point is having an alternative to the text editor in which you write the SOQL query where you can select an SObject and then select the desired fields (perhaps some other things like sort criteria and simple filters), then the query will be generated for you. This would be similar to the way it works in the Workbench UI. That would help folks who aren't familiar with SOQL syntax and/or the queried SObjects to quickly create queries.

  2. Log in to comment