Package weave.utils

Examples of weave.utils.SQLResult


      query = String.format(
          "select count(*) from %s group by " + Strings.mult(",", "%s", keyColumns.length) + " having count(*)>1",
          formatArgs
        );

      SQLResult result = SQLUtils.getResultFromQuery(conn, query, null, false);
      if (result.rows.length > 0)
        throw new RemoteException(String.format(
            "Values in the selected column%s do not uniquely identify rows in the table.",
            keyColumns.length == 1 ? "" : "s"
          ));
View Full Code Here


     
      // generate and test each query before modifying config file
      List<ColumnInfo> columnInfoList = new Vector<ColumnInfo>();
      boolean foundMatchingColumnIds = false;
     
      SQLResult filteredValues = null;
      if (filterColumnIndices != null && filterColumnIndices.length > 0)
      {
        // get a list of unique combinations of filter values
        String columnList = "";
        for (int i = 0; i < filterColumnIndices.length; i++)
View Full Code Here

      try
      {
        query = entity.privateMetadata.get(PrivateMetadata.SQLQUERY);
        String connName = entity.privateMetadata.get(PrivateMetadata.CONNECTION);
        String sqlParams = entity.privateMetadata.get(PrivateMetadata.SQLPARAMS);
        SQLResult result;
        Connection conn = getConnectionConfig().getConnectionInfo(connName).getStaticReadOnlyConnection();

        String[] sqlParamsArray = null;
        if (!Strings.isEmpty(sqlParams))
          sqlParamsArray = CSVParser.defaultParser.parseCSV(sqlParams, true)[0];
View Full Code Here

      {
        String sqlParamsString = entity.privateMetadata.get(PrivateMetadata.SQLPARAMS);
        sqlParams = CSVParser.defaultParser.parseCSVRow(sqlParamsString, true);
      }
     
      SQLResult result = SQLUtils.getResultFromQuery(conn, query, sqlParams, false);
     
      // if dataType is defined in the config file, use that value.
      // otherwise, derive it from the sql result.
      if (Strings.isEmpty(dataType))
      {
View Full Code Here

TOP

Related Classes of weave.utils.SQLResult

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.