mirror of
https://github.com/pocoproject/poco.git
synced 2025-04-16 15:01:15 +02:00
style fixes
This commit is contained in:
parent
3feaaa6987
commit
fd9ca0a9b6
@ -57,13 +57,12 @@ public:
|
|||||||
static const int OPERATION_UPDATE;
|
static const int OPERATION_UPDATE;
|
||||||
|
|
||||||
static void addColumnType(std::string sqliteType, MetaColumn::ColumnDataType pocoType);
|
static void addColumnType(std::string sqliteType, MetaColumn::ColumnDataType pocoType);
|
||||||
/// Adds or replaces the mapping for SQLite column type \p sqliteType
|
/// Adds or replaces the mapping for SQLite column type sqliteType
|
||||||
/// to a Poco type \p pocoType
|
/// to a Poco type pocoType.
|
||||||
///
|
///
|
||||||
/// \p sqliteType is a case-insensitive desription of the column type with
|
/// sqliteType is a case-insensitive desription of the column type with
|
||||||
/// any value \p pocoType value but MetaColumn::FDT_UNKNOWN. A
|
/// any value pocoType value but MetaColumn::FDT_UNKNOWN.
|
||||||
/// Poco::Data::NotSupportedException is thrown if \p pocoType is invalid.
|
/// A Poco::Data::NotSupportedException is thrown if pocoType is invalid.
|
||||||
|
|
||||||
|
|
||||||
static sqlite3* dbHandle(const Session& session);
|
static sqlite3* dbHandle(const Session& session);
|
||||||
/// Returns native DB handle.
|
/// Returns native DB handle.
|
||||||
|
@ -66,6 +66,7 @@ Utility::Utility()
|
|||||||
initializeDefaultTypes();
|
initializeDefaultTypes();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Utility::initializeDefaultTypes()
|
void Utility::initializeDefaultTypes()
|
||||||
{
|
{
|
||||||
if (_types.empty())
|
if (_types.empty())
|
||||||
@ -167,12 +168,10 @@ MetaColumn::ColumnDataType Utility::getColumnType(sqlite3_stmt* pStmt, std::size
|
|||||||
sqliteType = sqliteType.substr(0, sqliteType.find_first_of(" ("));
|
sqliteType = sqliteType.substr(0, sqliteType.find_first_of(" ("));
|
||||||
|
|
||||||
TypeMap::const_iterator it = _types.find(Poco::trimInPlace(sqliteType));
|
TypeMap::const_iterator it = _types.find(Poco::trimInPlace(sqliteType));
|
||||||
if (_types.end() == it) {
|
if (_types.end() == it)
|
||||||
return MetaColumn::FDT_BLOB;
|
return MetaColumn::FDT_BLOB;
|
||||||
}
|
else
|
||||||
else {
|
|
||||||
return it->second;
|
return it->second;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user