-
-
Notifications
You must be signed in to change notification settings - Fork 22
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
User Defined Functions/ Table Valued Functions #43
Comments
I assume this feature would exist within the |
Yes, it would involve type generation. And I will get back to you as soon as possible with a code example. |
What kind of support does |
While So there would need to be a metadata query that returns:
|
-- To get Table Functions
SELECT * FROM INFORMATION_SCHEMA.ROUTINES WHERE ROUTINE_TYPE = 'FUNCTION' AND DATA_TYPE = 'TABLE'
-- To get Scalar functions, same as above except filter out DATA_TYPE 'TABLE'
SELECT * FROM INFORMATION_SCHEMA.ROUTINES WHERE ROUTINE_TYPE = 'FUNCTION' AND DATA_TYPE <> 'TABLE'
-- To get output columns
SELECT * FROM INFORMATION_SCHEMA.ROUTINE_COLUMNS -- Join on `TABLE_SCHEMA` and `TABLE_NAME`
-- To get input parameters
SELECT * FROM INFORMATION_SCHEMA.PARAMETERS -- Join on `SPECIFIC_SCHEMA` and `SPECIFIC_NAME` |
This seems doable. However, there is some refactoring in process that needs to be completed before this can be started. |
Ok, that sounds good. Thank you for being open to the idea. Please let me know if there's anything else you need from me. |
@JordanMarr Is there any movement on this? Our team has run into an issue where we have to run both table and scalar functions and get the results. Would this solution be able to support scalar functions in addition to the table functions? |
It would be a nice feature to have for sure, but it’s not something I need and therefore no movement. |
@RJSonnenberg I think I ended up using Dapper for this particular issue. I can send you more specifics in the morning if you need them. |
This feature looks like it could be challenging to implement because:
|
Hello,
I was wondering if you would be open to the idea of either adding and/or receiving a PR for User Defined Functions and Table Valued Functions? I use MS SQL Server, and would very much like to use SQL Hydra in conjunction with UDF's/TVF's. I might know someone who can help with the PR if that's the route you decide to go.
Thanks so much.
The text was updated successfully, but these errors were encountered: