diff options
Diffstat (limited to 'libodbcpp/odbc-selectcommand.cpp')
-rw-r--r-- | libodbcpp/odbc-selectcommand.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/libodbcpp/odbc-selectcommand.cpp b/libodbcpp/odbc-selectcommand.cpp index e33b3da..6b28a32 100644 --- a/libodbcpp/odbc-selectcommand.cpp +++ b/libodbcpp/odbc-selectcommand.cpp @@ -43,7 +43,7 @@ ODBC::SelectCommand::fetch(SQLSMALLINT orientation, SQLLEN offset) if (SQL_SUCCEEDED(diagrc)) { if (!strncmp((const char*)sqlstatus, "01004", 5)) { for (Columns::iterator i = columns->begin(); i != columns->end(); ++i) { - boost::dynamic_pointer_cast<Column>(*i)->resize(); + std::dynamic_pointer_cast<Column>(*i)->resize(); } return fetch(SQL_FETCH_RELATIVE, 0); } @@ -57,7 +57,7 @@ ODBC::SelectCommand::fetch(SQLSMALLINT orientation, SQLLEN offset) { bool resized = false; for (Columns::iterator i = columns->begin(); i != columns->end(); ++i) { - resized |= boost::dynamic_pointer_cast<Column>(*i)->resize(); + resized |= std::dynamic_pointer_cast<Column>(*i)->resize(); } if (resized) { return fetch(SQL_FETCH_RELATIVE, 0); @@ -97,13 +97,13 @@ ODBC::SelectCommand::execute() case SQL_REAL: case SQL_FLOAT: case SQL_DOUBLE: - ncol = insertColumn(DB::ColumnPtr(new FloatingPointColumn(this, colName, col))); + ncol = insertColumn(std::make_shared<FloatingPointColumn>(this, colName, col)); break; case SQL_SMALLINT: case SQL_INTEGER: case SQL_TINYINT: case SQL_BIGINT: - ncol = insertColumn(DB::ColumnPtr(new SignedIntegerColumn(this, colName, col))); + ncol = insertColumn(std::make_shared<SignedIntegerColumn>(this, colName, col)); break; case SQL_TYPE_TIME: case SQL_INTERVAL_YEAR: @@ -119,21 +119,21 @@ ODBC::SelectCommand::execute() case SQL_INTERVAL_HOUR_TO_MINUTE: case SQL_INTERVAL_HOUR_TO_SECOND: case SQL_INTERVAL_MINUTE_TO_SECOND: - ncol = insertColumn(DB::ColumnPtr(new IntervalColumn(this, colName, col))); + ncol = insertColumn(std::make_shared<IntervalColumn>(this, colName, col)); break; case SQL_TIMESTAMP: case SQL_DATETIME: case SQL_TYPE_DATE: case SQL_TYPE_TIMESTAMP: - ncol = insertColumn(DB::ColumnPtr(new TimeStampColumn(this, colName, col))); + ncol = insertColumn(std::make_shared<TimeStampColumn>(this, colName, col)); break; case SQL_UNKNOWN_TYPE: throw DB::ColumnTypeNotSupported(); default: - ncol = insertColumn(DB::ColumnPtr(new CharArrayColumn(this, colName, col, bindSize))); + ncol = insertColumn(std::make_shared<CharArrayColumn>(this, colName, col, bindSize)); break; }; - boost::dynamic_pointer_cast<Column>(ncol)->bind(); + std::dynamic_pointer_cast<Column>(ncol)->bind(); } } |