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

Use of asterisk wildcard in some queries #1

Closed
pcarana opened this issue Jul 5, 2017 · 2 comments
Closed

Use of asterisk wildcard in some queries #1

pcarana opened this issue Jul 5, 2017 · 2 comments

Comments

@pcarana
Copy link
Contributor

pcarana commented Jul 5, 2017

Some of the queries use the asterisk wildcard to get all the columns from a table, just to say a few:

  • CountryCode.sql -> #getAll
  • Domain.sql -> #getByLdhName, #searchByPartialNameWZone, #searchByNameWZone, ...
  • Entity.sql -> #getByHandle, #getByDomain, #getAll, ...

This doesn't represent a problem (apparently), but it's a good practice and also a recommendation to improve performance, to list only the columns that are expected to be used. In this case, this columns are used by the classes mx.nic.rdap.sql.objects.*DbObj. So I recommend that instead of using the wildcard, the queries should return the columns expected by the java objects.

@pcarana
Copy link
Contributor Author

pcarana commented Aug 28, 2017

Also, listing the column names in the queries could save some reading time to someone that wishes to modify the queries; yes: it's more text, but the query is more explicit.

@pcarana pcarana added this to the v1.1.1 milestone Sep 22, 2017
@pcarana pcarana added the solved label Sep 22, 2017
@TheRedTrainer
Copy link

Verified. All the queries files (.sql) includes all the required columns listed, the asterisk wildcard were removed.

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