Ejemplo n.º 1
0
NABoolean isHBaseUmdHistograms(const QualifiedName& qualifiedName)
{
   return (
             HSGlobalsClass::isHBaseUMDHistogram(
                   qualifiedName.getQualifiedNameAsAnsiString()
                                                 ) &&
             HSGlobalsClass::isTrafodionCatalog(qualifiedName.getCatalogName())
           );
}
Ejemplo n.º 2
0
//////////////////////////////////////////////////////////////////////////////
// Given a table qualified name, returns the table's name as an Ansi string
NAString MVJoinGraph::fixName(const QualifiedName& tableName) const
{
  // If the name already has double-quotes mark, that means it is already
  // in an Ansi format. if we return it ...AsAnsiString, another set of
  // double-quotes will be added, and we don't want to do that.
  if(tableName.getObjectName().contains('"'))
  {
    return tableName.getQualifiedNameAsString();
  }
  return tableName.getQualifiedNameAsAnsiString();
}
Ejemplo n.º 3
0
CharInfo::Collation CollationDB::insert(QualifiedName &qn,
					const SchemaName *defaultSchema,
					CollationInfo::CollationFlags flags)
{
  Int32 defaultMatchCount = 0;
  if (defaultSchema)
    defaultMatchCount = qn.applyDefaults(*defaultSchema);

  CMPASSERT(!qn.getCatalogName().isNull()); // fully qualified w/ all defaults

  size_t siz[CollationInfo::SIZEARRAY_SIZE];
  NAString nam(qn.getQualifiedNameAsAnsiString(siz));
  CMPASSERT(siz[0] == 3);		    // fully qualified w/ all defaults

  return insert(nam, siz, flags, defaultMatchCount);
}
Ejemplo n.º 4
0
// Writes a row-value-constructor consisting of fully qualified column names
// in Ansi (external) format
void RefConstraint::getPredicateText(NAString &text, 
				     const QualifiedName &tblName,
				     const KeyColumns &keyColumns,
				     NAString *corrName) const
{
  NAString tblText = ( (corrName == NULL) ? tblName.getQualifiedNameAsAnsiString() : *corrName);
  int pos= 0;
  text += "(";
  for (CollIndex i = 0; i < keyColumns.entries(); i++)
    {
      if(isHiddenColumn(keyColumns[i]->getColName()) )
        continue;
      if (pos > 0)
      {
        text += ",";
      }
      text += tblText + "." + ToAnsiIdentifier(keyColumns[i]->getColName());
      pos++; //move the pos
    }
  text += ")";
}