Package org.voltdb.client

Examples of org.voltdb.client.Client.callProcedure()


                if (m_types[k] == VoltType.STRING)
                    curr_string++;
            }
            try {
                caught = false;
                client.callProcedure("Insert", params);
            }
            catch (final RuntimeException e) {
                assertTrue(e.getCause() instanceof java.io.IOException);
                assertTrue(e.toString().contains("String exceeds maximum length of"));
                caught = true;
View Full Code Here


                if (m_types[k] == VoltType.STRING)
                    curr_string++;
            }
            try {
                caught = false;
                ClientResponse cr = client.callProcedure("Insert", params);
                assertNotNull(cr);
            }
            catch (final ProcCallException e) {
                caught = true;
            }
View Full Code Here

            // Each insert into the NO_NULLS table must fail with a
            // constraint failure.  Verify this.

            System.out.println("testNullsRejected: :" + k + " " + m_types[k]);
            try {
                ClientResponse cr = client.callProcedure("Insert", params);
                assertNotNull(cr);
            } catch (final ProcCallException e) {
                if (e.getMessage().contains("CONSTRAINT VIOLATION"))
                    caught = true;
                else {
View Full Code Here

            try {
                params[0] = "ALLOW_NULLS";
                // We'll use the multi-partition insert for this test.  Between
                // this and testInsertNull_No_Nulls we should cover both
                // cases in ticket 306
                client.callProcedure("InsertMulti", params);
            } catch (final ProcCallException e) {
                e.printStackTrace();
                fail();
            } catch (final NoConnectionsException e) {
                e.printStackTrace();
View Full Code Here

                fail();
            }

            // verify that the row was inserted
            try {
                final VoltTable[] result = client.callProcedure("Select", "ALLOW_NULLS", pkey.get()).getResults();
                final VoltTableRow row = result[0].fetchRow(0);
                for (int i=0; i < COLS; ++i) {
                    final Object obj = row.get(i+1, m_types[i]);
                    if (i == k) {
                        assertTrue(row.wasNull());
View Full Code Here

            for (int i = 0; i < COLS; i++) {
                params[i+2] = m_midValues[i];
                assert(params[i+2] != null);
            }
            params[0] = "ALLOW_NULLS";
            client.callProcedure("Insert", params);


            for (int i = 0; i < COLS; i++) {
                params[i+2] = (i == k) ? m_nullValues[i] : m_midValues[i];
                assert(params[i+2] != null);
View Full Code Here

                params[i+2] = (i == k) ? m_nullValues[i] : m_midValues[i];
                assert(params[i+2] != null);
            }

            try {
                client.callProcedure("Update", params);
            } catch (final ProcCallException e) {
                e.printStackTrace();
                fail();
            } catch (final NoConnectionsException e) {
                e.printStackTrace();
View Full Code Here

                e.printStackTrace();
                fail();
            }

            // verify that the row was updated
            final VoltTable[] result = client.callProcedure("Select", "ALLOW_NULLS", pkey.get()).getResults();
            final VoltTableRow row = result[0].fetchRow(0);
            for (int i=0; i < COLS; ++i) {
                final Object obj = row.get(i+1, m_types[i]);
                if (i == k) {
                    assertTrue(row.wasNull());
View Full Code Here

            for (int i = 0; i < COLS; i++) {
                params[i+2] = (i == k) ? m_nullValues[i] : m_midValues[i];
                assert(params[i+2] != null);
            }
            params[0] = "ALLOW_NULLS";
            client.callProcedure("Insert", params);

            for (int i = 0; i < COLS; i++) {
                params[i+2] = m_midValues[i];
                assert(params[i+2] != null);
            }
View Full Code Here

                params[i+2] = m_midValues[i];
                assert(params[i+2] != null);
            }

            try {
                client.callProcedure("Update", params);
            } catch (final ProcCallException e) {
                e.printStackTrace();
                fail();
            } catch (final NoConnectionsException e) {
                e.printStackTrace();
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.