Package org.apache.derbyTesting.functionTests.util.streams

Examples of org.apache.derbyTesting.functionTests.util.streams.CharAlphabet


     * @throws SQLException
     * @throws IOException
     */
    private void testClobInTriggerTable(int clobSize) throws SQLException, IOException {
        // Alphabet used when inserting a CLOB.
        CharAlphabet a1 = CharAlphabet.singleChar('a');
        // Alphabet used when updating a CLOB.
        CharAlphabet a2 = CharAlphabet.singleChar('b');
     
      // --- add a clob
      String trig = " create trigger t_lob1 after update of str1 on lob1 ";
        trig = trig + " REFERENCING OLD AS old NEW AS new FOR EACH ROW MODE DB2SQL ";
        trig = trig + " insert into t_lob1_log(oldvalue, newvalue) values (old.str1, new.str1)";
View Full Code Here


     *
     */
    public void testUpdateTriggerOnClobColumn() throws SQLException, IOException
    {
        // Alphabet used when inserting a CLOB.
        CharAlphabet a1 = CharAlphabet.singleChar('a');
        // Alphabet used when updating a CLOB.
        CharAlphabet a2 = CharAlphabet.singleChar('b');

      Connection conn = getConnection();
      Statement s = createStatement();
      String trig = " create trigger t_lob1 after update of str1 on lob1 ";
      trig = trig + " REFERENCING OLD AS old NEW AS new FOR EACH ROW MODE DB2SQL ";
View Full Code Here

     * <p>
     * This case fills the Clob with latin lowercase characters.
     */
    public void testGetCharacterStreamLongLastCharLatin()
            throws IOException, SQLException {
        CharAlphabet alphabet = CharAlphabet.modernLatinLowercase();
        // Insert a Clob
        int length = 5000;
        PreparedStatement ps = prepareStatement(
            "insert into BLOBCLOB(ID, CLOBDATA) values(?,?)");
        int id = BlobClobTestSetup.getID();
View Full Code Here

     * <p>
     * This case fills the Clob with Chinese/Japanese/Korean characters.
     */
    public void testGetCharacterStreamLongLastCharCJK()
            throws IOException, SQLException {
        CharAlphabet alphabet = CharAlphabet.cjkSubset();
        // Insert a Clob
        int length = 9001;
        PreparedStatement ps = prepareStatement(
            "insert into BLOBCLOB(ID, CLOBDATA) values(?,?)");
        int id = BlobClobTestSetup.getID();
View Full Code Here

                ps.setBytes(3, new byte[0]);
                ps.setInt(4, 0);
                ps.setInt(5, rnd.nextInt());
                ps.executeUpdate();
                for (int i=0; i < 100; i++) {
                    CharAlphabet ca = getCharAlphabet(1 + rnd.nextInt(3));
                    int length = (int)(rnd.nextDouble() * 64.0 * 1024.0);
                    if (rnd.nextInt(1000) < 500) {
                        // Specify the length.
                        ps.setCharacterStream( 1,
                                new LoopingAlphabetReader(length, ca), length);
View Full Code Here

    //         - false means test setCharacterStream on VARCHAR
  private void helperTestDerby6237(int numberOfRowsToUpdate,
            int testVariation,
            boolean testCLOB) throws Exception
    {
        CharAlphabet a1 = CharAlphabet.singleChar('a');

        //Following will update one or 2 rows depending on the 1st param
        //Following will update CLOB column or VARCHAR column with short
        // or large data depending on param 2
        //Following will update CLOB column or VARCHAR column depending
View Full Code Here

     * @throws SQLException
     * @throws IOException
     */
    private void testClobInTriggerTable(int clobSize) throws SQLException, IOException {
        // Alphabet used when inserting a CLOB.
        CharAlphabet a1 = CharAlphabet.singleChar('a');
        // Alphabet used when updating a CLOB.
        CharAlphabet a2 = CharAlphabet.singleChar('b');
     
      // --- add a clob
      String trig = " create trigger t_lob1 after update of str1 on lob1 ";
        trig = trig + " REFERENCING OLD AS old NEW AS new FOR EACH ROW MODE DB2SQL ";
        trig = trig + " insert into t_lob1_log(oldvalue, newvalue) values (old.str1, new.str1)";
View Full Code Here

     *
     */
    public void testUpdateTriggerOnClobColumn() throws SQLException, IOException
    {
        // Alphabet used when inserting a CLOB.
        CharAlphabet a1 = CharAlphabet.singleChar('a');
        // Alphabet used when updating a CLOB.
        CharAlphabet a2 = CharAlphabet.singleChar('b');

      Connection conn = getConnection();
      Statement s = createStatement();
      String trig = " create trigger t_lob1 after update of str1 on lob1 ";
      trig = trig + " REFERENCING OLD AS old NEW AS new FOR EACH ROW MODE DB2SQL ";
View Full Code Here

    //         - false means test setCharacterStream on VARCHAR
  private void helperTestDerby6237(int numberOfRowsToUpdate,
            int testVariation,
            boolean testCLOB) throws Exception
    {
        CharAlphabet a1 = CharAlphabet.singleChar('a');

        //Following will update one or 2 rows depending on the 1st param
        //Following will update CLOB column or VARCHAR column with short
        // or large data depending on param 2
        //Following will update CLOB column or VARCHAR column depending
View Full Code Here

     * @throws SQLException
     * @throws IOException
     */
    private void testClobInTriggerTable(int clobSize) throws SQLException, IOException {
        // Alphabet used when inserting a CLOB.
        CharAlphabet a1 = CharAlphabet.singleChar('a');
        // Alphabet used when updating a CLOB.
        CharAlphabet a2 = CharAlphabet.singleChar('b');
     
      // --- add a clob
      String trig = " create trigger t_lob1 after update of str1 on lob1 ";
        trig = trig + " REFERENCING OLD AS old NEW AS new FOR EACH ROW MODE DB2SQL ";
        trig = trig + " insert into t_lob1_log(oldvalue, newvalue) values (old.str1, new.str1)";
View Full Code Here

TOP

Related Classes of org.apache.derbyTesting.functionTests.util.streams.CharAlphabet

Copyright © 2018 www.massapicom. 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.