Package com.salesforce.phoenix.util

Examples of com.salesforce.phoenix.util.ColumnInfo


                Integer sqlType = allColumnsInfoMap.get(rowkey);
                if (sqlType == null) {
                    throw new SQLExceptionInfo.Builder(SQLExceptionCode.PRIMARY_KEY_MISSING)
                         .setColumnName(rowkey).setTableName(fullTableName).build().buildException();
                }
                columnMetadata[position] = new ColumnInfo(rowkey, sqlType);
                position++;
            }
           
            this.upsertStatement = QueryUtil.constructUpsertStatement(columnMetadata, fullTableName, columnMetadata.length);
            logger.info(" the upsert statement is {} " ,this.upsertStatement);
View Full Code Here


            Integer sqlType = allColumnsInfoMap.get(columnName);
            if (sqlType == null) {
                   throw new SQLExceptionInfo.Builder(SQLExceptionCode.COLUMN_NOT_FOUND)
                        .setColumnName(columnName).setTableName(this.fullTableName).build().buildException();
            } else {
                columnMetadata[position] = new ColumnInfo(columnName, sqlType);
                position++;
            }
       }
       return position;
    }
View Full Code Here

    if (columnMetadataList == null) {
      columnMetadataList = new ArrayList<ColumnInfo>();
      String[] tableMetadata = getTableMetadata(getTableName());
      ResultSet rs = conn.getMetaData().getColumns(null, tableMetadata[0], tableMetadata[1], null);
      while (rs.next()) {
        columnMetadataList.add(new ColumnInfo(rs.getString(QueryUtil.COLUMN_NAME_POSITION), rs.getInt(QueryUtil.DATA_TYPE_POSITION)));
      }
    }
   
    // Generating UPSERT statement without column name information.
    String upsertStmt = QueryUtil.constructUpsertStatement(null, getTableName(), columnMetadataList.size());
View Full Code Here

TOP

Related Classes of com.salesforce.phoenix.util.ColumnInfo

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.