components/global/core/io.cellery.observability.api/src/main/java/io/cellery/observability/api/siddhi/SiddhiStoreQuery.java
public Object[][] execute() {
        if (logger.isDebugEnabled()) {
            logger.debug("Executed Siddhi store query: " + query);
        }
        Event[] queryResults = ServiceHolder.getSiddhiStoreQueryManager().query(query);

        Object[][] results = null;
        if (queryResults != null) {
            int rowCount = queryResults.length;
            if (rowCount > 0) {
                int columnCount = queryResults[0].getData().length;

                results = new Object[rowCount][columnCount];
                for (int i = 0; i < rowCount; i++) {
                    Object[] resultRow = new Object[columnCount];
                    for (int j = 0; j < columnCount; j++) {
                        resultRow[j] = queryResults[i].getData(j);
                    }
                    results[i] = resultRow;
                }
            }
        }
        if (results == null) {    // No matching results
            results = new Object[0][0];
        }
        return results;
    }
/**
     * Execute the Siddhi Store query and get the results as Json Array of Json Objects.
     *
     * @return Siddhi Store Query Results
     */
Execute the Siddhi Store query and get the results as Json Array of Json Objects.
@return Siddhi Store Query Results
Execute the Siddhi Store query and get the results as Json Array of Json Objects . @return Siddhi Store Query Results
public Object[][] execute() {
        if (logger.isDebugEnabled()) {
            logger.debug("Executed Siddhi store query: " + query);
        }
        Event[] queryResults = ServiceHolder.getSiddhiStoreQueryManager().query(query);
        Object[][] results = null;
        if (queryResults != null) {
            int rowCount = queryResults.length;
            if (rowCount > 0) {
                int columnCount = queryResults[0].getData().length;
                results = new Object[rowCount][columnCount];
                for (int i = 0; i < rowCount; i++) {
                    Object[] resultRow = new Object[columnCount];
                    for (int j = 0; j < columnCount; j++) {
                        resultRow[j] = queryResults[i].getData(j);
                    }
                    results[i] = resultRow;
                }
            }
        }
        if (results == null) {    
            results = new Object[0][0];
        }
        return results;
    }
public Object [ ] [ ] execute ( ) { if ( logger . isDebugEnabled ( ) ) { logger . debug ( "Executed Siddhi store query: " + query ) ; } Event [ ] queryResults = ServiceHolder . getSiddhiStoreQueryManager ( ) . query ( query ) ; Object [ ] [ ] results = null ; if ( queryResults != null ) { int rowCount = queryResults . length ; if ( rowCount > 0 ) { int columnCount = queryResults [ 0 ] . getData ( ) . length ; results = new Object [ rowCount ] [ columnCount ] ; for ( int i = 0 ; i < rowCount ; i ++ ) { Object [ ] resultRow = new Object [ columnCount ] ; for ( int j = 0 ; j < columnCount ; j ++ ) { resultRow [ j ] = queryResults [ i ] . getData ( j ) ; } results [ i ] = resultRow ; } } } if ( results == null ) { results = new Object [ 0 ] [ 0 ] ; } return results ; }
Execute the Siddhi Store query and get the results as Json Array of Json Objects.
Execute the Siddhi Store query and get the results as Json Array of Json Objects .
// No matching results