mirror of
https://github.com/pocoproject/poco.git
synced 2025-01-08 11:02:17 +01:00
rename 'separator' to 'frac'; develop: PostgreSQLTest: missing ExecUtil class #1788
This commit is contained in:
parent
7f193697db
commit
128c5c57eb
@ -952,8 +952,8 @@ void PostgreSQLTest::recreatePersonTimeTable()
|
||||
|
||||
void PostgreSQLTest::recreateIntsTable()
|
||||
{
|
||||
dropTable("Ints");
|
||||
try { *_pSession << "CREATE TABLE " << ExecUtil::ints() << " (str INTEGER)", now; }
|
||||
dropTable("Strings");
|
||||
try { *_pSession << "CREATE TABLE Strings (str INTEGER)", now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.displayText() << std::endl; fail ("recreateIntsTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.displayText() << std::endl; fail ("recreateIntsTable()"); }
|
||||
}
|
||||
|
@ -415,7 +415,7 @@ Var Var::parse(const std::string& val, std::string::size_type& pos)
|
||||
bool isNumber = false;
|
||||
bool isSigned = false;
|
||||
int separators = 0;
|
||||
int separator = 0;
|
||||
int frac = 0;
|
||||
int index = 0;
|
||||
size_t size = str.size();
|
||||
for (size_t i = 0; i < size ; ++i)
|
||||
@ -432,7 +432,7 @@ Var Var::parse(const std::string& val, std::string::size_type& pos)
|
||||
}
|
||||
else if (ch == '.' || ch == ',')
|
||||
{
|
||||
separator = ch;
|
||||
frac = ch;
|
||||
++separators;
|
||||
if (separators > 1)
|
||||
return str;
|
||||
@ -443,17 +443,17 @@ Var Var::parse(const std::string& val, std::string::size_type& pos)
|
||||
++index;
|
||||
}
|
||||
|
||||
if (separator && isNumber)
|
||||
if (frac && isNumber)
|
||||
{
|
||||
const double number = NumberParser::parseFloat(str, separator);
|
||||
const double number = NumberParser::parseFloat(str, frac);
|
||||
return Var(number);
|
||||
}
|
||||
else if (separator == 0 && isNumber && isSigned)
|
||||
else if (frac == 0 && isNumber && isSigned)
|
||||
{
|
||||
const Poco::Int64 number = NumberParser::parse64(str);
|
||||
return number;
|
||||
}
|
||||
else if (separator == 0 && isNumber && !isSigned)
|
||||
else if (frac == 0 && isNumber && !isSigned)
|
||||
{
|
||||
const Poco::UInt64 number = NumberParser::parseUnsigned64(str);
|
||||
return number;
|
||||
|
Loading…
Reference in New Issue
Block a user