-
Notifications
You must be signed in to change notification settings - Fork 85
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
catalog: Add find_procedures/find_procedure_columns #249
Conversation
Fixup NANODBC_TEXT / unicode usage
@detule This generally looks good and thanks for this update. I don't like the One obvious question:
Technically, it is possible, but the |
Hey @mloskot
Finally, as is always the case with OOP, as slick as it may be - is this abstraction worth it? It's not like we'll have a number of database objects on the horizon - should we just keep it simple - stick to separate classes, code repetiton and all, but keep the naming uniform per your suggestion, and slap a What do you think? |
I did not suggest to go the OOP way, to have a base class/interface and to inherit from it. Sorry if I wasn't clear. I suggested to consider single concrete
Yes, I'm also in favour of simple concrete classes rather than base interface and inheritance, even if it means code repetition.
Yes, indeed, for a bunch of similar but separate classes uniform naming is important as it makes up a common coherent interface. |
Thanks @mloskot appreciate the feedback. In terms of re-using the At any rate, this is why i thought you might be suggesting an abstraction as a way to unify both. To avoid that and re-use the existing class: I guess we can add Is that the direction you were thinking in? Seems less abstract than injecting inheritance and additional class structure; still though we would need to write out the maps, modify the methods to lookup the index of the field they are asked to serve up - there would still be a bit of code churn. Let me know happy to give it a shot if you think that's best. |
I reflected on my initial idea and gave it a bit more consideration, and I think there is little point in trying to have single
I think, we can just maintain I'd also back out of the idea of the interface unification, i.e. name method @detule @lexicalunit thoughts? |
@mloskot agreed. If I read your comment correctly - whats outstanding is for me to expand out some of the names I had abbreviated. Thanks for the feedback. |
@detule Yes, I suggest we consistently avoid abbreviations when naming elements of public interface. |
proc_* -> procedure_*
Should be done. Thanks again. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks for the contribution!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very cool!
Hi team: Let me know if there's anything outstanding here. |
@detule I'm sorry, I completely forgot to merge it. Thanks again! |
Hi @lexicalunit @mloskot
This is an implementation of the SQLProcedures and SQLProcedureColumns function calls.
This PR adds:
Methods:
catalog::find_procedures
: Implementation ofSQLProcedures
, similar tofind_tables
.catalog::find_procedure_columns
: Implementation ofSQLProcedureColumns
, similar tofind_columns
.Classes:
catalog::procedures
: Result set fromfind_procedures
; similar tocatalog::tables
.catalog::procedure_columns
: Result set fromfind_columns
; similar tocatalog::columns
.Looking forward to hearing your feedback.
Thanks