21#include <com/sun/star/sdbc/ColumnSearch.hpp>
22#include <com/sun/star/sdbc/DataType.hpp>
23#include <com/sun/star/sdbc/ColumnValue.hpp>
24#include <com/sun/star/sdbc/SQLException.hpp>
25#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
142 pResult->setRows(std::move(aRows));
147 const Any& ,
const OUString& ,
const OUString& tableNamePattern,
148 const OUString& columnNamePattern )
150 ::osl::MutexGuard aGuard(
m_aMutex );
154 throw SQLException();
156 Reference< XNameAccess> xNames = xTables->getTables();
158 throw SQLException();
163 Sequence< OUString> aTabNames(xNames->getElementNames());
164 const OUString* pTabBegin = aTabNames.getConstArray();
165 const OUString* pTabEnd = pTabBegin + aTabNames.getLength();
166 for(;pTabBegin != pTabEnd;++pTabBegin)
168 if(
match(tableNamePattern,*pTabBegin,
'\0'))
170 Reference< XColumnsSupplier> xTable(
171 xNames->getByName(*pTabBegin), css::uno::UNO_QUERY);
174 Reference< XNameAccess> xColumns = xTable->getColumns();
176 throw SQLException();
178 Sequence< OUString>
aColNames(xColumns->getElementNames());
180 const OUString* pBegin =
aColNames.getConstArray();
181 const OUString* pEnd = pBegin +
aColNames.getLength();
182 Reference< XPropertySet>
xColumn;
183 for(sal_Int32
i=1;pBegin != pEnd;++pBegin,++
i)
185 if(
match(columnNamePattern,*pBegin,
'\0'))
190 xColumns->getByName(*pBegin), css::uno::UNO_QUERY);
191 OSL_ENSURE(
xColumn.is(),
"Columns contains a column who isn't a fastpropertyset!");
199 switch(aRow[5]->
getValue().getInt32())
202 case DataType::VARCHAR:
205 case DataType::LONGVARCHAR:
212 switch(aRow[11]->
getValue().getInt32())
214 case ColumnValue::NO_NULLS:
217 case ColumnValue::NULLABLE:
223 aRows.push_back(aRow);
230 pResult->setRows(std::move(aRows));
237 ::osl::MutexGuard aGuard(
m_aMutex );
ORowSetValueDecorator decorates an ORowSetValue so the value is "refcounted".
virtual css::uno::Reference< css::sdbcx::XTablesSupplier > createCatalog()
mutable::osl::Mutex m_aMutex
sal_Int32 getINT32(const Any &_rAny)
OUString getString(const Any &_rAny)
static bool getValue(EContact *pContact, sal_Int32 nColumnNum, GType nType, GValue *pStackValue, bool &_out_rWasNull)
bool match(const sal_Unicode *pWild, const sal_Unicode *pStr, const sal_Unicode cEscape)
#define PROPERTY_ID_ISNULLABLE
#define PROPERTY_ID_PRECISION
#define PROPERTY_ID_TYPENAME
#define PROPERTY_ID_DEFAULTVALUE
#define PROPERTY_ID_SCALE
const Color aColNames[SC_RANGECOLORS]