Skip to content

Can you add support for returning Stream on Call #2557

Answered by hgschmie
metaforte asked this question in Q&A
Discussion options

You must be logged in to vote

Wow, never thought that I would be dealing with MS SQLServer on non-Windows. :-)

Thank you for reporting this. I think this is the first time someone asked a question about MS SQLServer and Jdbi.

I got this working:

    @Test
    public void testMsSqlServerCall() {
        Jdbi db = extension.getJdbi();
        Handle h = extension.getSharedHandle();
        h.execute("CREATE PROCEDURE simpleCursor\n"
            + "AS\n"
            + "BEGIN\n"
            + "    SELECT 'hello' UNION ALL SELECT 'world'\n"
            + "END;");

        try (SqlServerCall call = new SqlServerCall(h, "{ call simpleCursor()}")) {
            List<String> results = call.mapTo(String.class).list();

        …

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@metaforte
Comment options

Comment options

You must be logged in to vote
1 reply
@metaforte
Comment options

Answer selected by metaforte
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants