本文整理汇总了C++中NAString::toUpper方法的典型用法代码示例。如果您正苦于以下问题:C++ NAString::toUpper方法的具体用法?C++ NAString::toUpper怎么用?C++ NAString::toUpper使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NAString
的用法示例。
在下文中一共展示了NAString::toUpper方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: isHive
NABoolean QualifiedName::isHive(const NAString &catName)
{
NAString hiveDefCatName = "";
CmpCommon::getDefault(HIVE_CATALOG, hiveDefCatName, FALSE);
hiveDefCatName.toUpper();
if (CmpCommon::getDefault(MODE_SEAHIVE) == DF_ON &&
((NOT catName.isNull()) &&
((catName == HIVE_SYSTEM_CATALOG) ||
(catName == hiveDefCatName))))
return TRUE;
return FALSE;
}
示例2: validateVolatileName
NABoolean CmpSqlSession::validateVolatileName(const char * name)
{
ComObjectName volTabName(name);
NAString schemaNamePart =
volTabName.getSchemaNamePartAsAnsiString(TRUE);
schemaNamePart.toUpper();
ULng32 len =
MINOF(schemaNamePart.length(),
strlen(COM_VOLATILE_SCHEMA_PREFIX));
if ((len < strlen(COM_VOLATILE_SCHEMA_PREFIX)) ||
(strncmp(schemaNamePart.data(), COM_VOLATILE_SCHEMA_PREFIX, len) != 0))
{
return FALSE;
}
return TRUE;
}
示例3: applyUpper
void DefaultValidator::applyUpper(NAString &value) const
{
switch (caseSensitive()) {
case CASE_SENSITIVE: return;
case CASE_INSENSITIVE: value.toUpper(); return;
case CASE_SENSITIVE_ANSI: {
// Make copy of value so we can own its data()
// for casting away const-ness.
NAString tmp(value);
char *s = (char *)tmp.data();
for (NABoolean quoted = FALSE; *s; s++) {
if (*s == '"')
quoted = !quoted;
else if (!quoted)
#pragma nowarn(1506) // warning elimination
*s = toupper(*s);
#pragma warn(1506) // warning elimination
}
value = tmp;
return;
}
default: CMPASSERT(FALSE);
}
}
示例4: processOption
// This processes options of the form:
// <hyphen><single option char><zero or more blanks><required argument string>
// e.g. "-ifilename" "-i filename".
// An (English) error message is emitted for "-i" without an argument,
// "-" without an option letter, and "x" without a hyphen, but
// all other options pass thru with no error, as they may be an X option
// processed later in the InitializeX call.
//
// If the "-u name" option is specified, a copy of the name is
// returned in the user_name output parameter.
// The name is always uppercased regardless of whether it is enclosed
// in double quotes.
void processOption(Int32 argc, char *argv[], Int32 &i,
const char *& in_filename,
const char *& input_string,
const char *& out_filename,
char *& sock_port,
NAString &user_name
)
{
Int32 iorig = i;
char op = '\0';
// const char *argAfterOp = NULL;
char *argAfterOp = NULL;
Int32 status;
if (argv[i][0] == '-')
{
op = argv[i][1];
if (op)
if (argv[i][2])
argAfterOp = &argv[i][2];
else if (i < argc-1)
argAfterOp = argv[++i];
}
if (argAfterOp)
{
switch (op)
{
case 's': sock_port = argAfterOp; // socket port number
break;
case 'i': in_filename = argAfterOp; // input file
break;
case 'o': out_filename = argAfterOp; // output file
break;
case 'q': input_string = argAfterOp; // input qry
break;
// case 'p': sqlci->getUtil()->setProgramName(argAfterOp); // utility name
// break;
// case 't': sqlci->getUtil()->setTerminalName(argAfterOp); // utility debug
// sqlci->getUtil()->setDebug(11); // inspect flag
// break;
case 'u':
{
// The user_name output parameter will contain a copy of the
// name
user_name = argAfterOp;
user_name.toUpper();
} // case 'u'
break;
default:
; // ok -- may be an X option, processed later in InitializeX
} // switch (op)
} // if (argAfterOp)
else
{
// No argument appears after the option
switch (op)
{
case 'v': printf("sqlci version: %s\n", SCMBuildStr);
exit(0);
break;
case 'i':
case 'p':
case 't':
cerr << argv[0] << ": " << argv[iorig]
<< " option requires an argument -- ignored" << endl;
break;
case '\0':
cerr << argv[0] << ": " << argv[iorig]
<< " option is unknown -- ignored" << endl;
break;
default:
; // ok -- may be an X option, processed later in InitializeX
} // switch (op)
} // if (argAfterOp) else ...
}
示例5: createSeabaseRoutine
//.........这里部分代码省略.........
if (cliRC < 0)
{
cliInterface.retrieveSQLDiagnostics(CmpCommon::diags());
deallocEHI(ehi);
processReturn();
return;
}
if (cliRC == 100) // did not find the row
{
*CmpCommon::diags() << DgSqlCode(-1231)
<< DgString0(extRoutineName);
deallocEHI(ehi);
processReturn();
return;
}
char * ptr = NULL;
Lng32 len = 0;
cliInterface.getPtrAndLen(1, ptr, len);
str_cpy_all(externalPath, ptr, len);
externalPath[len] = '\0';
// determine language and parameter styles based on the library
// type, unless already specified
if (!createRoutineNode->isLanguageTypeSpecified())
{
NAString extPath(externalPath);
size_t lastDot = extPath.last('.');
NAString libSuffix;
if (lastDot != NA_NPOS)
libSuffix = extPath(lastDot,extPath.length()-lastDot);
libSuffix.toUpper();
if (libSuffix == ".JAR")
{
isJava = TRUE;
language = COM_LANGUAGE_JAVA;
}
else if (libSuffix == ".SO" ||
libSuffix == ".DLL")
{
// a known C/C++ library, set
// language and parameter style below
}
else
{
// language not specified and library name
// is inconclusive, issue an error
*CmpCommon::diags() << DgSqlCode( -3284 )
<< DgString0( externalPath );
processReturn();
}
}
// set parameter style and also language, if not already
// specified, based on routine type and type of library
if (isJava)
{
// library is a jar file
if (rType == COM_PROCEDURE_TYPE)
// Java stored procedures use the older Java style
style = COM_STYLE_JAVA_CALL;
else