-
Notifications
You must be signed in to change notification settings - Fork 437
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
UDT parameter for requests #487
Comments
UDT is not the only type that does not have 'validate' function. This is the full list of types that don't seem to have 'validate' : I think there is more work to support these parameter types than just adding a dummy 'validate'. If you see the constructor for RpcRequestPayload in rpcrequest-payload.js, it also invokes writeTypeInfo and writeParameterData on the type, and these are also missing for the UDTTYPE as well as the other types listed above. I think you need real implementations for the three methods at a minimum to support a type - 'validate', 'writeTypeInfo' and 'writeParameterData'. Seems like there is support for reading UDTTYPE. If you feel inspired to add support for UDTTYPE parameter, a look at readUDTInfo in metadata-parser.js might help. |
I've also had this problem. To solve it, I just changed "NTEXT" to "VARCHAR". It's still not fixed, please fix. |
I get error http://tediousjs.github.io/tedious/api-datatypes.html at least has UDT listed as not supported as parameters |
Hello!
I see that
request.js
has a functionvalidateParameters
which goes through all of the request parameters and callsvalidate
on each one's type, passing the parameter's value to check.The UDT type does not have a
validate
function defined indata-type.js
. This is a problem if you create a request with a UDT parameter and initiatecallProcedure
on it, because it tries to validate the parameters.I am willing to contribute to fix this issue. However, I want some input on the best way to address this. There are two good options:
validateParameters
skip parameters whose type does not have avalidate
function.validate
function for UDT that does... something. Maybe just returns the value without doing anything?Any suggestions? Thanks!
The text was updated successfully, but these errors were encountered: