Package io.crate.action.sql

Examples of io.crate.action.sql.SQLResponse.readFrom()


    public void testSerializationReadFrom() throws Exception {
        byte[] buf = new byte[]
                { 0,0,2,2,4,99,111,108,49,4,99,111,108,50,0,0,0,2,0,9,114,111,119,49,95,99,111,108,49,0,9,114,111,119,49,95,99,111,108,50,0,9,114,111,119,50,95,99,111,108,49,0,9,114,111,119,50,95,99,111,108,50,0,1,0,0,0,2,4,4};
        BytesStreamInput in = new BytesStreamInput(buf, false);
        SQLResponse resp = new SQLResponse();
        resp.readFrom(in);

        assertThat(resp.cols(), is(new String[] { "col1", "col2" }));
        assertThat(resp.rows(), is(new Object[][] {
                new Object[] {"row1_col1", "row1_col2"},
                new Object[] {"row2_col1", "row2_col2"},
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.