24#include <com/sun/star/sdbc/ColumnSearch.hpp>
25#include <com/sun/star/beans/PropertyAttribute.hpp>
45ODatabaseMetaDataResultSet::ODatabaseMetaDataResultSet()
104 OSL_FAIL(
"Wrong type!");
122 ODatabaseMetaDataResultSet_BASE::acquire();
127 ODatabaseMetaDataResultSet_BASE::release();
133 return aRet.hasValue() ? aRet : ODatabaseMetaDataResultSet_BASE::queryInterface(rType);
142 return ::comphelper::concatSequences(
aTypes.getTypes(),ODatabaseMetaDataResultSet_BASE::getTypes());
154 ::osl::MutexGuard aGuard(
m_aMutex );
155 checkDisposed(ODatabaseMetaDataResultSet_BASE::rBHelper.bDisposed );
158 Reference< XResultSetMetaData > xMeta =
getMetaData();
159 sal_Int32 nLen = xMeta->getColumnCount();
163 if(xMeta->isCaseSensitive(
i) ?
columnName == xMeta->getColumnName(
i) :
164 columnName.equalsIgnoreAsciiCase(xMeta->getColumnName(
i))
246 ::osl::MutexGuard aGuard(
m_aMutex );
247 checkDisposed(ODatabaseMetaDataResultSet_BASE::rBHelper.bDisposed );
342 ::osl::MutexGuard aGuard(
m_aMutex );
343 checkDisposed(ODatabaseMetaDataResultSet_BASE::rBHelper.bDisposed );
415 ::osl::MutexGuard aGuard(
m_aMutex );
416 checkDisposed(ODatabaseMetaDataResultSet_BASE::rBHelper.bDisposed );
444 ::osl::MutexGuard aGuard(
m_aMutex );
445 checkDisposed(ODatabaseMetaDataResultSet_BASE::rBHelper.bDisposed );
474 Sequence< Property > aProps;
476 return new ::cppu::OPropertyArrayHelper(aProps);
487 pMetaData->setProceduresMap();
494 pMetaData->setCatalogsMap();
501 pMetaData->setSchemasMap();
508 pMetaData->setColumnPrivilegesMap();
515 pMetaData->setColumnsMap();
522 pMetaData->setTablesMap();
529 pMetaData->setProcedureColumnsMap();
536 pMetaData->setPrimaryKeysMap();
543 pMetaData->setIndexInfoMap();
550 pMetaData->setTablePrivilegesMap();
557 pMetaData->setCrossReferenceMap();
564 pMetaData->setVersionColumnsMap();
571 pMetaData->setBestRowIdentifierMap();
578 pMetaData->setTypeInfoMap();
585 pMetaData->setUDTsMap();
592 pMetaData->setTableTypes();
599 pMetaData->setExportedKeysMap();
606 pMetaData->setImportedKeysMap();
612 return ::cppu::OPropertySetHelper::createPropertySetInfo(
getInfoHelper());
623 ::osl::MutexGuard aGuard(
m_aMutex );
624 checkDisposed(ODatabaseMetaDataResultSet_BASE::rBHelper.bDisposed );
633 return *(*m_aRowsIter)[columnIndex];
641 return aEmptyValueRef;
721 if ( _aArguments.getLength() != 2 )
724 sal_Int32 nResultSetType = 0;
725 if ( !(_aArguments[0] >>= nResultSetType))
729 Sequence< Sequence<Any> > aRows;
730 if ( !(_aArguments[1] >>= aRows) )
734 const Sequence<Any>* pRowsIter = aRows.getConstArray();
735 const Sequence<Any>* pRowsEnd = pRowsIter + aRows.getLength();
736 for (; pRowsIter != pRowsEnd;++pRowsIter)
739 const Any* pRowIter = pRowsIter->getConstArray();
740 const Any* pRowEnd = pRowIter + pRowsIter->getLength();
741 for (; pRowIter != pRowEnd;++pRowIter)
744 switch( pRowIter->getValueTypeClass() )
746 case TypeClass_BOOLEAN:
749 *pRowIter >>= bValue;
760 case TypeClass_SHORT:
761 case TypeClass_UNSIGNED_SHORT:
769 case TypeClass_UNSIGNED_LONG:
776 case TypeClass_HYPER:
777 case TypeClass_UNSIGNED_HYPER:
784 case TypeClass_FLOAT:
791 case TypeClass_DOUBLE:
798 case TypeClass_STRING:
801 *pRowIter >>= sValue;
808 aRowToSet.push_back(aValue);
810 aRowsToSet.push_back(aRowToSet);
812 setRows(std::move(aRowsToSet));
819 return "org.openoffice.comp.helper.DatabaseMetaDataResultSet";
829 return Sequence<OUString>{
"com.sun.star.sdbc.ResultSet" };
832extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
834 css::uno::XComponentContext* , css::uno::Sequence<css::uno::Any>
const&)
::cppu::IPropertyArrayHelper * getArrayHelper()
void describeProperties(css::uno::Sequence< css::beans::Property > &_rProps) const
void registerProperty(const OUString &_rName, sal_Int32 _nHandle, sal_Int32 _nAttributes, void *_pPointerToMember, const css::uno::Type &_rMemberType)
void disposing(std::unique_lock< std::mutex > &rGuard)
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
ORowSetValueDecorator decorates an ORowSetValue so the value is "refcounted".
ORowSetValueDecorator & operator=(const ORowSetValue &_aValue)
css::util::Time getTime() const
sal_Int32 getInt32() const
OUString getString() const
css::uno::Any makeAny() const
sal_Int16 getInt16() const
css::util::Date getDate() const
css::util::DateTime getDateTime() const
sal_Int64 getLong() const
css::uno::Sequence< sal_Int8 > getSequence() const
mutable::osl::Mutex m_aMutex
::cppu::WeakComponentImplHelper< css::sdbc::XResultSet, css::sdbc::XRow, css::sdbc::XResultSetMetaDataSupplier, css::util::XCancellable, css::sdbc::XWarningsSupplier, css::sdbc::XCloseable, css::lang::XInitialization, css::lang::XServiceInfo, css::sdbc::XColumnLocate > ODatabaseMetaDataResultSet_BASE
void checkDisposed(bool _bThrow)
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
constexpr std::enable_if_t< std::is_signed_v< T >, std::make_unsigned_t< T > > make_unsigned(T value)
#define PROPERTY_ID_RESULTSETTYPE
#define PROPERTY_ID_RESULTSETCONCURRENCY
#define PROPERTY_ID_FETCHSIZE
#define PROPERTY_ID_FETCHDIRECTION