Package org.qi4j.library.sql.common

Examples of org.qi4j.library.sql.common.Databases.update()


            throws SQLException, PropertyVetoException
    {
        Databases databases = new Databases( dataSource );

        // Insert some data and print it out
        databases.update( "insert into test values ('id1','foo')" );
        databases.query( "select * from test" ).transferTo( Outputs.withReceiver( new Receiver<ResultSet, SQLException>()
        {
            @Override
            public void receive( ResultSet item )
                    throws SQLException
View Full Code Here


        } ) );

        Databases databases2 = new Databases( dataSource2.get() );

        // Insert some data and print it out
        databases2.update( "insert into test values ('id2','bar')" );
        databases2.query( "select * from test" ).transferTo( Outputs.withReceiver( new Receiver<ResultSet, SQLException>()
        {
            @Override
            public void receive( ResultSet item )
                    throws SQLException
View Full Code Here

        // Instanciate Databases helper
        Databases database = new Databases( ds );

        // Assert that insertion works
        assertTrue( database.update( "insert into test values ('someid', 'bar')" ) == 1 );
        // END SNIPPET: io

        database.query( "select * from test", new Databases.ResultSetVisitor()
        {
            @Override
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.