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

!metadata keeps silence in case of wrong method arguments #312

Closed
snuyanzin opened this issue Jun 12, 2019 · 3 comments
Closed

!metadata keeps silence in case of wrong method arguments #312

snuyanzin opened this issue Jun 12, 2019 · 3 comments

Comments

@snuyanzin
Copy link
Collaborator

For instance each of the next lines has no output (as getTables requires 4 arguments)

0: jdbc:postgresql://...> !metadata getTables
0: jdbc:postgresql://...> !metadata getTables %
0: jdbc:postgresql://...> !metadata getTables % %
0: jdbc:postgresql://...> !metadata getTables % % %

while the line shows all tables

0: jdbc:postgresql://...> !metadata getTables % % % %
@julianhyde
Copy link
Owner

I'm guessing that it supplies default values (e.g. empty string) for the missing parameters, but the default value isn't very useful? In which case, the new behavior would be to throw if the user doesn't supply the right number of arguments?

@snuyanzin
Copy link
Collaborator Author

I think you mean !tables, !indexes, !primarykeys and others command where it really supplies default values.
But in case of !metadata getTables or !metadata whatever based on code it looks like it does not even try to supply default values.

if (ptypes.length != args.size()) {

It checks if the number of method arguments is equal to input arguments otherwise it does not go further.

@snuyanzin
Copy link
Collaborator Author

Merged as 36cb512

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

Successfully merging a pull request may close this issue.

2 participants