CommandQueryService implements Query.Service { @Override public Query prepareQuery( String sql, int maxRows, Map<String, String> parameters ) throws KettleException { return prepareQuery( sql, null, 0, 0, 0, parameters ); } CommandQueryService( DataServiceContext context ); @Override Query prepareQuery( String sql, int maxRows, Map<String, String> parameters ); @Override Query prepareQuery( String sql, IDataServiceClientService.StreamingMode windowMode,
                                       long windowSize, long windowEvery, long windowLimit,
                                       final Map<String, String> parameters ); static DataOutputStream asDataOutputStream( OutputStream outputStream );  }
@Test public void testExecuteNonCommandQuery() throws Exception { Query result = client.prepareQuery( TEST_NON_COMMAND_SQL_QUERY, MAX_ROWS, new HashMap() ); assertNull( result ); result = client.prepareQuery( TEST_NON_COMMAND_SQL_QUERY, WINDOW_MODE, WINDOW_SIZE, WINDOW_EVERY, WINDOW_MAX_SIZE, new HashMap() ); assertNull( result ); }
@Test public void testExecuteCommandQuery() throws Exception { Query result = client.prepareQuery( TEST_COMMAND_SQL_QUERY, MAX_ROWS, new HashMap() ); assertNotNull( result ); assertEquals( 0, result.getTransList().size() ); result = client.prepareQuery( TEST_COMMAND_SQL_QUERY, WINDOW_MODE, WINDOW_SIZE, WINDOW_EVERY, WINDOW_MAX_SIZE, new HashMap() ); assertNotNull( result ); assertEquals( 0, result.getTransList().size() ); }