本文整理汇总了C++中QualifiedName::getSchemaName方法的典型用法代码示例。如果您正苦于以下问题:C++ QualifiedName::getSchemaName方法的具体用法?C++ QualifiedName::getSchemaName怎么用?C++ QualifiedName::getSchemaName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QualifiedName
的用法示例。
在下文中一共展示了QualifiedName::getSchemaName方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
NABoolean CmpSqlSession::validateVolatileQualifiedSchemaName
(QualifiedName &inName)
{
if (NOT inName.getSchemaName().isNull())
{
if (!validateVolatileSchemaName((NAString&)inName.getSchemaNameAsAnsiString()))
return FALSE;
}
return TRUE;
}
示例2: validateVolatileQualifiedName
NABoolean CmpSqlSession::validateVolatileQualifiedName(QualifiedName &inName)
{
if (NOT Get_SqlParser_Flags(ALLOW_VOLATILE_SCHEMA_IN_TABLE_NAME))
{
if (NOT inName.getCatalogName().isNull())
{
// cannot be a 3-part name
*CmpCommon::diags() << DgSqlCode(-4192);
return FALSE;
}
if (NOT inName.getSchemaName().isNull())
{
// validate that the schemaName part is the currentUserName
if (inName.getSchemaName() != externalUserName_)
{
*CmpCommon::diags() << DgSqlCode(-4191) <<
DgString0(inName.getSchemaName()) <<
DgString1(externalUserName_);
return FALSE;
}
}
}
else
{
// Volatile schema name is allowed.
// Make sure that it is a valid volatile 3 part name.
if ((NOT inName.getCatalogName().isNull()) &&
(NOT inName.getSchemaName().isNull()))
{
// move to a temp to upcase
ComSchemaName csn(inName.getSchemaName());
ULng32 len =
MINOF(strlen(csn.getSchemaNamePartAsAnsiString().data()),
strlen(COM_VOLATILE_SCHEMA_PREFIX));
NAString upSch(csn.getSchemaNamePartAsAnsiString().data());
upSch.toUpper();
if ((len < strlen(COM_VOLATILE_SCHEMA_PREFIX)) ||
(strncmp(upSch.data(), COM_VOLATILE_SCHEMA_PREFIX, len) != 0))
{
*CmpCommon::diags() << DgSqlCode(-4192);
return FALSE;
}
}
else if (NOT inName.getSchemaName().isNull())
{
// 2 part name
// validate that the schemaName part is the currentUserName
if (inName.getSchemaName() != externalUserName_)
{
*CmpCommon::diags() << DgSqlCode(-4191) <<
DgString0(inName.getSchemaName()) <<
DgString1(externalUserName_);
return FALSE;
}
}
}
return TRUE;
}
示例3: isHiveTable
NABoolean TriggerDB::isHiveTable(QualifiedName& name)
{
return strcmp(name.getSchemaName(), "HIVE") == 0;
}