Package org.voltdb

Examples of org.voltdb.VoltTable.toJSONString()


        voltclient.callProcedure("CreateItem", 1, 11);
        voltclient.callProcedure("CreateItem", 2, 12);

        // check that the query does the right thing
        VoltTable result = voltclient.callProcedure("GetItems",11,1,1).getResults()[0];
        System.out.println(result.toJSONString());
        if (result.getRowCount() != 1) {
            System.err.printf("Call failed with %d rows\n", result.getRowCount());
        }

        // clean up / shutdown
View Full Code Here


        // Display the whole query results as a JSON String
        String SQL = "SELECT json_data FROM user_session_table WHERE username='voltdb' OR username='voltdb2' ORDER BY username";
        VoltTable table = runQuery("Retrieve the JSON data for two particular logins. Treat the whole result set as JSON:", SQL);
        System.out.println("The whole result set as JSON:");
        System.out.println(table.toJSONString());
        System.out.println();

        // Display individual results as JSON
        table = runQuery("Retrieve the JSON data for two particular logins. Just grab a JSON value from the result:", SQL);
        table.advanceRow();
View Full Code Here

        response = client.callProcedure("UpdateT1c", "c2", "a");
        assertEquals(1, getLongFromResponse(response));

        response = client.callProcedure("LookupT1b", "b");
        table = getSingleRowTable(response);
        System.out.println(table.toJSONString());
    }

    public void testMultimapKeyOwnership() throws Exception {
        final Client client = this.getClient();
        ClientResponse response;
View Full Code Here

        response = client.callProcedure("DeleteT1", "c1");
        assertEquals(1, getLongFromResponse(response));

        response = client.callProcedure("LookupT1b", "b");
        table = getSingleRowTable(response);
        System.out.println(table.toJSONString());

        // Try to repro a string memory management related crash when a no-op update corrupts an index.
        response = client.callProcedure("UpdateT1b", "b", "a2");
        assertEquals(1, getLongFromResponse(response));
View Full Code Here

        System.out.println("RUNNING MVAll");
        System.out.flush();
        response = client.callProcedure("MVAll");
        table = getSingleRowTable(response);
        System.out.println(table.toJSONString());

        System.out.println("RUNNING MVLookup");
        System.out.flush();
        response = client.callProcedure("MVLookup", "b", "a");
        table = getSingleRowTable(response);
View Full Code Here

        System.out.println("RUNNING MVLookup");
        System.out.flush();
        response = client.callProcedure("MVLookup", "b", "a");
        table = getSingleRowTable(response);
        System.out.println(table.toJSONString());

        System.out.println("RUNNING DeleteT1");
        System.out.flush();
        response = client.callProcedure("DeleteT1", "c1");
        assertEquals(1, getLongFromResponse(response));
View Full Code Here

        System.out.println("RUNNING MVLookup");
        System.out.flush();
        response = client.callProcedure("MVLookup", "b", "a");
        table = getSingleRowTable(response);
        System.out.println(table.toJSONString());
    }

    //
    // JUnit / RegressionSuite boilerplate
    //
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.