add parameterised value support for text #75

merged 1 commit into from Feb 17, 2013


None yet
2 participants

zachaller commented Feb 14, 2013

This allows support for text types to be parameters however TDS dose not allow text to be ouput parameters so that is not supported as well as I had some issue with empty string such as '' from my understanding it my not be supported ( and if so the test case for it should either be removed or modified.

Signed-off-by: Zach Aller

add parameterised value support for text
Signed-off-by: Zach Aller <>

pekim commented Feb 17, 2013

Thanks for this. It's great to see the integration tests.

Regarding the null vs. empty string issue, I think that you may have uncovered a bug in the parsing of text values in tedious. A test added to fails with AssertionError: "" === null.

  exports.textEmpty = (test) ->
    execSql(test, "select cast('' as text) as text", '')

I can see that the response from the server is different from the one from this, passing, test.

  exports.textNull = (test) ->
    execSql(test, "select cast(null as text) as text", null)

So I think that it may be fixable. I'm digging in to the details of the response now.

@pekim pekim merged commit 48ea787 into tediousjs:master Feb 17, 2013


pekim commented Feb 17, 2013

Empty (zero-length) values for test/ntext/image columns were not being distinguished from null values.
I've fixed this in fd7ead7.

The failing test for an empty text parameter now passes.

Thanks again for this PR.

momow pushed a commit to momow/tedious that referenced this pull request Oct 15, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment