Package com.asakusafw.windgate.core

Examples of com.asakusafw.windgate.core.ParameterList


        h2.execute("INSERT INTO PAIR (KEY, VALUE) VALUES (1, 'Hello1, world!')");
        h2.execute("INSERT INTO PAIR (KEY, VALUE) VALUES (2, 'Hello2, world!')");
        h2.execute("INSERT INTO PAIR (KEY, VALUE) VALUES (3, 'Hello3, world!')");

        JdbcResourceManipulator manipulator = new JdbcResourceManipulator(profile(), new ParameterList());

        assertThat(h2.count("PAIR"), is(3));
        manipulator.cleanupSource(process);
        assertThat(h2.count("PAIR"), is(0));
    }
View Full Code Here


        h2.execute("INSERT INTO PAIR (KEY, VALUE) VALUES (2, 'Hello2, world!')");
        h2.execute("INSERT INTO PAIR (KEY, VALUE) VALUES (3, 'Hello3, world!')");

        JdbcProfile profile = profile();
        profile.setTruncateStatement("DELETE FROM {0} WHERE KEY = 1");
        JdbcResourceManipulator manipulator = new JdbcResourceManipulator(profile, new ParameterList());

        assertThat(h2.count("PAIR"), is(3));
        manipulator.cleanupSource(process);
        assertThat(h2.count("PAIR"), is(2));
    }
View Full Code Here

        conf.put(JdbcProcess.COLUMNS.key(), "KEY,VALUE");
        conf.put(JdbcProcess.JDBC_SUPPORT.key(), PairSupport.class.getName());

        ProcessScript<Pair> process = process(new DriverScript("jdbc", conf), dummy());

        JdbcResourceManipulator manipulator = new JdbcResourceManipulator(profile(), new ParameterList());
        manipulator.cleanupSource(process);
        // green
    }
View Full Code Here

        h2.execute("INSERT INTO PAIR (KEY, VALUE) VALUES (1, 'Hello1, world!')");
        h2.execute("INSERT INTO PAIR (KEY, VALUE) VALUES (2, 'Hello2, world!')");
        h2.execute("INSERT INTO PAIR (KEY, VALUE) VALUES (3, 'Hello3, world!')");

        JdbcResourceManipulator manipulator = new JdbcResourceManipulator(profile(), new ParameterList());

        assertThat(h2.count("PAIR"), is(3));
        manipulator.cleanupDrain(process);
        assertThat(h2.count("PAIR"), is(0));
    }
View Full Code Here

        h2.execute("INSERT INTO PAIR (KEY, VALUE) VALUES (2, 'Hello2, world!')");
        h2.execute("INSERT INTO PAIR (KEY, VALUE) VALUES (3, 'Hello3, world!')");

        JdbcProfile profile = profile();
        profile.setTruncateStatement("DELETE FROM {0} WHERE KEY IN (1, 2)");
        JdbcResourceManipulator manipulator = new JdbcResourceManipulator(profile, new ParameterList());

        assertThat(h2.count("PAIR"), is(3));
        manipulator.cleanupDrain(process);
        assertThat(h2.count("PAIR"), is(1));
    }
View Full Code Here

        conf.put(JdbcProcess.COLUMNS.key(), "KEY,VALUE");
        conf.put(JdbcProcess.JDBC_SUPPORT.key(), PairSupport.class.getName());
        conf.put(JdbcProcess.OPERATION.key(), JdbcProcess.OperationKind.INSERT_AFTER_TRUNCATE.value());

        ProcessScript<Pair> process = process(dummy(), new DriverScript("jdbc", conf));
        JdbcResourceManipulator manipulator = new JdbcResourceManipulator(profile(), new ParameterList());

        manipulator.cleanupDrain(process);
        // green
    }
View Full Code Here

        h2.execute("INSERT INTO PAIR (KEY, VALUE) VALUES (2, 'Hello2, world!')");
        h2.execute("INSERT INTO PAIR (KEY, VALUE) VALUES (3, 'Hello3, world!')");
        h2.execute("INSERT INTO PAIR (KEY, VALUE) VALUES (4, 'Hello4, world!')");
        h2.execute("INSERT INTO PAIR (KEY, VALUE) VALUES (5, 'Hello5, world!')");

        JdbcResourceManipulator manipulator = new JdbcResourceManipulator(profile(), new ParameterList());

        SourceDriver<Pair> driver = manipulator.createSourceForSource(process);
        try {
            driver.prepare();
            test(driver, "Hello3, world!", "Hello4, world!", "Hello5, world!");
View Full Code Here

        h2.execute("INSERT INTO PAIR (KEY, VALUE) VALUES (1, 'Hello1, world!')");

        ProcessScript<Pair> process = process(new DriverScript("jdbc", conf), dummy());

        JdbcResourceManipulator manipulator = new JdbcResourceManipulator(profile(), new ParameterList());
        DrainDriver<Pair> driver = manipulator.createDrainForSource(process);
        try {
            driver.prepare();
            driver.put(new Pair(2, "Hello2, world!"));
            driver.put(new Pair(3, "Hello3, world!"));
View Full Code Here

        h2.execute("INSERT INTO PAIR (KEY, VALUE) VALUES (1, 'Hello1, world!')");
        h2.execute("INSERT INTO PAIR (KEY, VALUE) VALUES (2, 'Hello2, world!')");
        h2.execute("INSERT INTO PAIR (KEY, VALUE) VALUES (3, 'Hello3, world!')");

        JdbcResourceManipulator manipulator = new JdbcResourceManipulator(profile(), new ParameterList());

        SourceDriver<Pair> driver = manipulator.createSourceForDrain(process);
        try {
            driver.prepare();
            test(driver, "Hello1, world!", "Hello2, world!", "Hello3, world!");
View Full Code Here

        h2.execute("INSERT INTO PAIR (KEY, VALUE) VALUES (1, 'Hello1, world!')");

        ProcessScript<Pair> process = process(dummy(), new DriverScript("jdbc", conf));

        JdbcResourceManipulator manipulator = new JdbcResourceManipulator(profile(), new ParameterList());
        DrainDriver<Pair> driver = manipulator.createDrainForDrain(process);
        try {
            driver.prepare();
            driver.put(new Pair(2, "Hello2, world!"));
            driver.put(new Pair(3, "Hello3, world!"));
View Full Code Here

TOP

Related Classes of com.asakusafw.windgate.core.ParameterList

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.