-
Notifications
You must be signed in to change notification settings - Fork 467
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
PrepareStatement.execute() with Geometry / Geography : TypeError: parameter.type.validate is not a function #743
Comments
I think UniqueIdentifier also exhibits this behavior. |
What version of mssql are you using? |
@markddrake we have an issue template for multiple reasons:
I'm closing this issue until you have provided the information the issue template requests |
PrepareStatement.execute() with Geometry / Geography raises TypeError: parameter.type.validate is not a function Expected behaviour:Error should not be thrown, or these types should be documented as unsupported and workarounds provided. For instance it looks like you can work around UniqueIdentifier by binding as CHAR(36). Actual behaviour:mssql rasies " TypeError: parameter.type.validate is not a function" when performing a prepare operation on a prepared statement that has an input defined using Geography, Geometry or UniqueIdentifier. Configuration:Software versions
|
David, could you please re-open the issue now.. I really think it would not be unreasonable to leave an issue open for at least 24 hours afte requesting additional information. |
Please note I have also updated the standalone testcase. |
Thanks for providing the requested information. Have you performed any debugging or attempted any remedial steps to get this working? |
Note sure what I can do, if you have any pointers I'll be happy to try it. Basically the code I have works fine except when I try to bind sql.Geography, sql.Geometry and sql.UniqueIdentifier. Obviously I have already boiled down a much larger complex application into the standalone testcase provided above. |
@markddrake have you tried executing the code with a debugger enabled to see where the error is originating; possibly identifying a fix that could be applied? |
Bit of a different callstack for me:
There doesn't seem to be any form of workaround using the |
This is caused by:
There are a couple of things we can do here:
I can see tests in this project: https://github.com/tediousjs/node-mssql/blob/master/test/common/tests.js#L151-L193 @patriksimek do you have any recommendation on how to proceed? |
closing as stale and tedious error |
The following code
Results in
Admitted newbie to MSQL so apologies in advance if I'm being stupid. Similar behavior is seen with Geography. Also note the error is not 'caught' by the try/catch block..
The text was updated successfully, but these errors were encountered: