Examples of TimestampType


Examples of org.hibernate.type.TimestampType

    }else if(Boolean.class.equals(clazz) || boolean.class.equals(clazz)){
      return new BooleanType();
    }else if(String.class.equals(clazz)){
      return new StringType();
    }else if(Date.class.equals(clazz)){
      return new TimestampType();
    }else if(Calendar.class.equals(clazz)){
      return new CalendarType();
    }else if(Locale.class.equals(clazz)){
      return new LocaleType();
    }else if(TimeZone.class.equals(clazz)){
View Full Code Here

Examples of org.voltdb.types.TimestampType

           
            Object args[] = {
                w_id,                   // W_ID
                (byte)rng.nextInt(10)// D_ID
                rng.nextInt(),          // C_ID
                new TimestampType(),    // TIMESTAMP
                item_id,                // ITEM_IDS
                supware,                // SUPPLY W_IDS
                quantity                // QUANTITIES
            };
           
View Full Code Here

Examples of org.voltdb.types.TimestampType

            char[] uninlineable = new char[1000];
            for (int j = 0; j < uninlineable.length; j++)
                uninlineable[j] = (char) (base + 32);

            voltQueueSQL(update, base + 1, base + 2, base + 3,
                         new TimestampType().getTime(),
                         (double) base / 100.0, new BigDecimal(base),
                         String.valueOf(base + 32),
                         String.valueOf(uninlineable), id);
        }
View Full Code Here

Examples of org.voltdb.types.TimestampType

                uninlineable[j] = (char) (base + 32);

            switch (i) {
            case INSERT:
                voltQueueSQL(statements[i], id, base + 1, base + 2, base + 3,
                             new TimestampType().getTime(),
                             (double) base / 100.0, new BigDecimal(base),
                             String.valueOf(base + 32),
                             String.valueOf(uninlineable));
            case UPDATE:
                voltQueueSQL(statements[i], base + 1, base + 2, base + 3,
                             new TimestampType().getTime(),
                             (double) base / 100.0, new BigDecimal(base),
                             String.valueOf(base + 32),
                             String.valueOf(uninlineable), id);
            case DELETE:
                voltQueueSQL(statements[i], id);
View Full Code Here

Examples of org.voltdb.types.TimestampType

            char[] uninlineable = new char[1000];
            for (int j = 0; j < uninlineable.length; j++)
                uninlineable[j] = (char) (base + 32);

            voltQueueSQL(update, base + 1, base + 2, base + 3,
                         new TimestampType().getTime(),
                         (double) base / 100.0, new BigDecimal(base),
                         String.valueOf(base + 32),
                         String.valueOf(uninlineable), id);
        }
View Full Code Here

Examples of org.voltdb.types.TimestampType

            char[] uninlineable = new char[1000];
            for (int j = 0; j < uninlineable.length; j++)
                uninlineable[j] = (char) (base + 32);

            voltQueueSQL(insert, base, base + 1, base + 2, base + 3,
                         new TimestampType().getTime(),
                         (double) base / 100.0, new BigDecimal(base),
                         String.valueOf(base + 32),
                         String.valueOf(uninlineable));
        }
View Full Code Here

Examples of org.voltdb.types.TimestampType

            char[] uninlineable = new char[1000];
            for (int j = 0; j < uninlineable.length; j++)
                uninlineable[j] = (char) (base + 32);

            voltQueueSQL(insert, base, base + 1, base + 2, base + 3,
                         new TimestampType().getTime(),
                         (double) base / 100.0, new BigDecimal(base),
                         String.valueOf(base + 32),
                         String.valueOf(uninlineable));
        }
View Full Code Here

Examples of org.voltdb.types.TimestampType

       
        Object params[] = {
            (short)w_id,        // W_ID
            (byte)d_id,         // D_ID
            1,                  // C_ID
            new TimestampType(),// TIMESTAMP
            item_ids,           // ITEM_IDS
            supwares,           // SUPPLY W_IDS
            quantities          // QUANTITIES
        };
        return (params);
View Full Code Here

Examples of org.voltdb.types.TimestampType

                0,
                0,
                0,
                0,
                0.0,
                new TimestampType(0),
                firstString,
                secondString,
                "",
                "",
                VoltType.NULL_DECIMAL
        };
        VoltTable results[] = client.callProcedure("Insert", params).getResults();
        params = null;
        firstString = null;
        secondString = null;

        assertEquals(results.length, 1);
        assertEquals( 1, results[0].asScalarLong());

        results = client.callProcedure("Select", "JUMBO_ROW", 0).getResults();
        assertEquals(results.length, 1);
        assertTrue(results[0].advanceRow());
        assertTrue(java.util.Arrays.equals( results[0].getStringAsBytes(1), firstStringBytes));
        assertTrue(java.util.Arrays.equals( results[0].getStringAsBytes(2), secondStringBytes));

        java.util.Arrays.fill(firstStringBytes, (byte)'q');
        firstString = new String(firstStringBytes, "UTF-8");
        java.util.Arrays.fill(secondStringBytes, (byte)'r');
        secondString = new String(secondStringBytes, "UTF-8");

        params = new Object[] {
                "JUMBO_ROW",
                0,
                0,
                0,
                0,
                0,
                0.0,
                new TimestampType(0),
                firstString,
                secondString,
                "",
                "",
                VoltType.NULL_DECIMAL
View Full Code Here

Examples of org.voltdb.types.TimestampType

        int x = 3;
        SyncCallback cb = new SyncCallback();
        client.callProcedure(cb,
                org.voltdb.benchmark.tpcc.procedures.InsertOrderLineBatched.class.getSimpleName(),
                new long[] {x}, new long[] {x}, x, new long[] {x},
                new long[] {x}, new long[] {x}, new TimestampType[] { new TimestampType() }, new long[] {x},
                new double[] {x}, new String[] {"a"});
        cb.waitForResponse();

        // make sure the previous catalog change has completed
        client.drain();

        // now calling the new proc better work
        x = 2;
        client.callProcedure(org.voltdb.benchmark.tpcc.procedures.InsertOrderLineBatched.class.getSimpleName(),
                new long[] {x}, new long[] {x}, x, new long[] {x},
                new long[] {x}, new long[] {x}, new TimestampType[] { new TimestampType() }, new long[] {x},
                new double[] {x}, new String[] {"a"});

        loadSomeData(client, 50, 5);

        // this is a do nothing change... shouldn't affect anything
        newCatalogURL = VoltServerConfig.getPathToCatalogForTest("catalogupdate-cluster-expanded.jar");
        results = client.callProcedure("@UpdateApplicationCatalog", newCatalogURL).getResults();
        assertTrue(results.length == 1);

        client.drain();

        // now calling the new proc better work
        x = 4;
        client.callProcedure(org.voltdb.benchmark.tpcc.procedures.InsertOrderLineBatched.class.getSimpleName(),
                new long[] {x}, new long[] {x}, x, new long[] {x},
                new long[] {x}, new long[] {x}, new TimestampType[] { new TimestampType() }, new long[] {x},
                new double[] {x}, new String[] {"a"});

        loadSomeData(client, 55, 5);

        // remove the procedure we just added async
        newCatalogURL = VoltServerConfig.getPathToCatalogForTest("catalogupdate-cluster-base.jar");
        callback = new CatTestCallback(Status.OK);
        client.callProcedure(callback, "@UpdateApplicationCatalog", newCatalogURL);

        // don't care if this works now
        x = 4;
        cb = new SyncCallback();
        client.callProcedure(cb,
                org.voltdb.benchmark.tpcc.procedures.InsertOrderLineBatched.class.getSimpleName(),
                new long[] {x}, new long[] {x}, x, new long[] {x},
                new long[] {x}, new long[] {x}, new TimestampType[] { new TimestampType() }, new long[] {x},
                new double[] {x}, new String[] {"a"});
        cb.waitForResponse();

        // make sure the previous catalog change has completed
        client.drain();

        // now calling the new proc better fail
        x = 5;
        cb = new SyncCallback();
        client.callProcedure(cb,
                org.voltdb.benchmark.tpcc.procedures.InsertOrderLineBatched.class.getSimpleName(),
                new long[] {x}, new long[] {x}, x, new long[] {x},
                new long[] {x}, new long[] {x}, new TimestampType[] { new TimestampType() }, new long[] {x},
                new double[] {x}, new String[] {"a"});
        cb.waitForResponse();
        assertNotSame(cb.getResponse().getStatus(), Status.OK);

        loadSomeData(client, 60, 5);
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.