NATraceList
ElemDDLConstraint::getDetailInfo() const
{
  NAString        detailText;
  NATraceList detailTextList;

  detailTextList.append(displayLabel1());   // constraint name
  detailTextList.append(displayLabel2());   // constraint type (e.g., Not Null)

  detailText = "Constraint kind: ";
  if (getConstraintKind() EQU ElemDDLConstraint::COLUMN_CONSTRAINT_DEF)
  {
    detailText += "Column";
  }
  else
  {
    detailText += "Table";
  }
  detailTextList.append(detailText);

  detailText = "is deferrable? ";
  detailText += YesNo(isDeferrable());
  detailTextList.append(detailText);

  detailText = "is droppable?  ";
  detailText += YesNo(isDroppable());
  detailTextList.append(detailText);

  detailText = "is enforced?  ";
  detailText += YesNo(isEnforced());
  detailTextList.append(detailText);

  return detailTextList;

} // ElemDDLConstraint::getDetailInfo()
NATraceList
StmtDDLSchGrant::getDetailInfo() const
{
    NAString        detailText;
    NATraceList detailTextList;

    //
    // object name
    //

    detailTextList.append(displayLabel1());   // object name

    //
    // privileges
    //

    StmtDDLSchGrant * localThis = (StmtDDLSchGrant *)this;

    detailTextList.append(localThis->getChild(INDEX_PRIVILEGES)
                          ->castToElemDDLNode()
                          ->castToElemDDLPrivileges()
                          ->getDetailInfo());

    //
    // grantee list
    //

    const ElemDDLGranteeArray & granteeArray = getGranteeArray();

    detailText = "Grantee list [";
    detailText += LongToNAString((Lng32)granteeArray.entries());
    detailText += " element(s)]";
    detailTextList.append(detailText);

    for (CollIndex i = 0; i < granteeArray.entries(); i++)
    {
        detailText = "[grantee ";
        detailText += LongToNAString((Lng32)i);
        detailText += "]";
        detailTextList.append(detailText);

        ComASSERT(granteeArray[i] NEQ NULL AND
                  granteeArray[i]->castToElemDDLGrantee() NEQ NULL);
        detailTextList.append("    ", granteeArray[i]->castToElemDDLGrantee()
                              ->getDetailInfo());
    }

    //
    // with grant option
    //

    detailText = "is with grant option? ";
    detailText += YesNo(localThis->getChild(INDEX_WITH_GRANT_OPTION) NEQ NULL);
    detailTextList.append(detailText);

    return detailTextList;

} // StmtDDLGrant::getDetailInfo
예제 #3
0
NATraceList
ElemDDLUdrLibrary::getDetailInfo() const
{
  NAString        detailText;
  NATraceList detailTextList;

  detailTextList.append(displayLabel1());

  return detailTextList;

}
예제 #4
0
NATraceList
ElemDDLColViewDef::getDetailInfo() const
{
  NAString        detailText;
  NATraceList detailTextList;

  detailTextList.append(displayLabel1());  // column name
  detailTextList.append(displayLabel2());  // heading

  return detailTextList;

} // ElemDDLColViewDef::getDetailInfo()
NATraceList
ElemDDLPartitionByOpt::getDetailInfo() const
{
  NATraceList detailTextList;

  //
  // Note that the invoked displayLabel1() is a method of
  // a class derived from class ElemDDLPartitionByOpt
  //
  detailTextList.append(displayLabel1());

  return detailTextList;
}
예제 #6
0
NATraceList
StmtDDLDropSequence::getDetailInfo() const
{
  NAString        detailText;
  NATraceList detailTextList;

  //
  // table name
  //

  detailTextList.append(displayLabel1());
  
  return detailTextList;
}
NATraceList StmtDDLRevokeComponentPrivilege::getDetailInfo() const
{
    NAString        detailText;
    NATraceList detailTextList;

    //
    // component name
    //

    detailTextList.append(displayLabel1());   // component name

    //
    // user role name
    //

    detailTextList.append(displayLabel2());   // user role name

    //
    // component privilege name list
    //

    const ConstStringList & privs = getComponentPrivilegeNameList();

    detailText = "Component Privilege Name List [";
    detailText += LongToNAString((Lng32)privs.entries());
    detailText += " element(s)]";
    detailTextList.append(detailText);

    for (CollIndex i = 0; i < privs.entries(); i++)
    {
        detailText = "[";
        detailText += LongToNAString((Lng32)i);
        detailText += "] ";
        detailText += *privs[i];
        detailTextList.append(detailText);
    }

    //
    // with revoke option
    //

    detailText = "is Grant Option For clause specified? ";
    detailText += YesNo(isGrantOptionForSpecified());
    detailTextList.append(detailText);

    return detailTextList;

} // StmtDDLRevokeComponentPrivilege::getDetailInfo
NATraceList
ElemDDLPartitionByColumnList::getDetailInfo() const
{
  NAString        detailText;
  NATraceList detailTextList;
  ElemDDLNode   * pPartitionKeyColumnList = getPartitionKeyColumnList();

  //
  // kind of store option
  //

  detailTextList.append(displayLabel1());

  //
  // column name list
  //

  if (pPartitionKeyColumnList EQU NULL)
  {
    detailTextList.append("No column name list.");
    return detailTextList;
  }

  detailText = "Column Name List [";
  detailText += LongToNAString((Lng32)pPartitionKeyColumnList->entries());
  detailText += " element(s)]:";
  detailTextList.append(detailText);

  for (CollIndex i = 0; i < pPartitionKeyColumnList->entries(); i++)
  {
    detailText = "[column ";
    detailText += LongToNAString((Lng32)i);
    detailText += "]";
    detailTextList.append(detailText);

    detailTextList.append("    ", (*pPartitionKeyColumnList)[i]
                                                         ->getDetailInfo());
  }
  return detailTextList;
}
NATraceList
ElemDDLPartitionSystem::getDetailInfo() const
{
  NAString        detailText;
  NATraceList detailTextList;

  detailTextList.append(displayLabel1());  // add or drop
  detailTextList.append(displayLabel2());  // location name
  detailTextList.append(displayLabel3());  // location name type

  //
  // file attributes for this partition
  //

  detailTextList.append("File attributes:");

  detailText = "    max size spec? ";
  detailText += YesNo(isMaxSizeSpecified());
  detailTextList.append(detailText);

  detailText = "    maxsizunbound? ";
  detailText += YesNo(isMaxSizeUnbounded());
  detailTextList.append(detailText);

  detailText = "    max size:      ";
  detailText += LongToNAString((Lng32)getMaxSize());
  detailTextList.append(detailText);

#pragma nowarn(1506)   // warning elimination 
  ElemDDLFileAttrMaxSize maxSizeFileAttr(getMaxSize(), 
                                         getMaxSizeUnit());
#pragma warn(1506)  // warning elimination

  detailText = "    max size unit: ";
  detailText += maxSizeFileAttr.getMaxSizeUnitAsNAString();;
  detailTextList.append(detailText);

  return detailTextList;
}
예제 #10
0
NATraceList
StmtDDLSchRevoke::getDetailInfo() const
{
    NAString        detailText;
    NATraceList detailTextList;

    //
    // object name
    //

    detailTextList.append(displayLabel1());   // object name

    //
    // privileges
    //

    StmtDDLSchRevoke * localThis = (StmtDDLSchRevoke *)this;

    detailTextList.append(localThis->getChild(INDEX_PRIVILEGES)
                          ->castToElemDDLNode()
                          ->castToElemDDLPrivileges()
                          ->getDetailInfo());

    //
    // grantee list
    //

    const ElemDDLGranteeArray & granteeArray = getGranteeArray();

    detailText = "Grantee list [";
    detailText += LongToNAString((Lng32)granteeArray.entries());
    detailText += " element(s)]";
    detailTextList.append(detailText);

    for (CollIndex i = 0; i < granteeArray.entries(); i++)
    {
        detailText = "[grantee ";
        detailText += LongToNAString((Lng32)i);
        detailText += "]";
        detailTextList.append(detailText);

        ComASSERT(granteeArray[i] NEQ NULL AND
                  granteeArray[i]->castToElemDDLGrantee() NEQ NULL);
        detailTextList.append("    ", granteeArray[i]->castToElemDDLGrantee()
                              ->getDetailInfo());
    }

    //
    // grant option for
    //

    detailText = "is grant option for? ";
    detailText += YesNo(isGrantOptionForSpecified());
    detailTextList.append(detailText);

    //
    // drop behavior
    //

    detailTextList.append(displayLabel2());   // drop behavior


    return detailTextList;

} // StmtDDLSchRevoke::getDetailInfo
예제 #11
0
NATraceList
ElemDDLColDef::getDetailInfo() const
{
  NAString        detailText;
  NATraceList detailTextList;

  detailTextList.append(displayLabel1());  // column name
  detailTextList.append(displayLabel2());  // column data type

  //
  // default value for column
  //
  
  if (getDefaultValueExpr() NEQ NULL)
  {
    detailText = "Default value: ";
    detailText += getDefaultValueExpr()->getText();
    detailTextList.append(detailText);
  }
  else
  {
    detailTextList.append("No default value.");
  }

  //
  // heading information for column
  //

  if (NOT getHeading().isNull())
  {
    detailText = "Heading: ";
    detailText += getHeading();
    detailTextList.append(detailText);
  }
  else
  {
    detailTextList.append("No heading.");
  }

  //
  // not null (column) constraint information
  //

  detailText = "notnull? ";
  detailText += YesNo(getIsConstraintNotNullSpecified());
  detailTextList.append(detailText);

  //
  // primary key column constraint information
  //

  detailText = "prikey?  ";
  detailText += YesNo(getIsConstraintPKSpecified());
  detailTextList.append(detailText);
  
  //
  // information about other column constraint definitions
  //

  const ElemDDLConstraintArray & consList = getConstraintArray();
  CollIndex nbrConstraints = consList.entries();

  if (nbrConstraints EQU 0)
  {
    detailTextList.append("No column constraints.");
  }
  else
  {
    detailText = "Column Constraints list [";
    detailText += LongToNAString((Lng32)nbrConstraints);
    detailText += " element(s)]:";
    detailTextList.append(detailText);

    for (CollIndex i = 0; i < nbrConstraints; i++)
    {
      ElemDDLConstraint * cons = consList[i];

      detailText = "[column constraint ";
      detailText += LongToNAString((Lng32)i);
      detailText += "]";
      detailTextList.append(detailText);

      NATraceList constraintDetailTextList = cons->getDetailInfo();

      for (CollIndex j = 0; j <  constraintDetailTextList.entries(); j++)
      {
        detailTextList.append(NAString("    ") + constraintDetailTextList[j]);
      }
    }
  }

  return detailTextList;

} // ElemDDLColDef::getDetailInfo()