33#include <systools/win32/oleauto.hxx>
35#include <com/sun/star/sdbc/DataType.hpp>
36#include <com/sun/star/sdbc/ProcedureResult.hpp>
37#include <com/sun/star/sdbc/ColumnValue.hpp>
41#include <com/sun/star/sdbcx/Privilege.hpp>
42#include <com/sun/star/sdbcx/PrivilegeObject.hpp>
43#include <com/sun/star/sdbc/KeyRule.hpp>
44#include <com/sun/star/sdbcx/KeyType.hpp>
52void ODatabaseMetaData::fillLiterals()
61 OSL_ENSURE(aRecordset,
"fillLiterals: no resultset!");
93 std::map<sal_uInt32,LiteralInfo>::const_iterator aIter =
m_aLiteralInfo.find(_nId);
95 nSize = (
static_cast<sal_Int32
>((*aIter).second.cchMaxLen) == -1) ? 0 : (*aIter).second.cchMaxLen;
103 bool bSupported =
false;
104 std::map<sal_uInt32,LiteralInfo>::const_iterator aIter =
m_aLiteralInfo.find(_nId);
106 bSupported = (*aIter).second.fSupported;
116 std::map<sal_uInt32,LiteralInfo>::const_iterator aIter =
m_aLiteralInfo.find(_nId);
118 sStr = (*aIter).second.pwszLiteralValue;
126 ColumnValue::NULLABLE,
134 ColumnValue::NO_NULLS,
138 ColumnValue::NO_NULLS,
142 ColumnValue::NULLABLE,
146 ColumnValue::NULLABLE,
150 ColumnValue::NO_NULLS,
154 ColumnValue::NO_NULLS,
158 ColumnValue::NO_NULLS,
166 ColumnValue::NULLABLE,
174 ColumnValue::NO_NULLS,
182 ColumnValue::NO_NULLS,
186 ColumnValue::NULLABLE,
194 ColumnValue::NO_NULLS,
198 ColumnValue::NULLABLE,
202 ColumnValue::NULLABLE,
210 ColumnValue::NULLABLE,
214 ColumnValue::NULLABLE,
222 ColumnValue::NO_NULLS,
230 ColumnValue::NO_NULLS,
234 ColumnValue::NO_NULLS,
238 ColumnValue::NO_NULLS,
242 ColumnValue::NO_NULLS,
246 ColumnValue::NO_NULLS,
250 ColumnValue::NO_NULLS,
258 ColumnValue::NULLABLE,
266 return (*m_mColumnsIter).second.isSearchable();
273 return (*m_mColumnsIter).second.isAutoIncrement();
285 return (*m_mColumnsIter).second.getTableName();
303 return (*m_mColumnsIter).second.isCaseSensitive();
316 ObjectTypeEnum eNumType= adPermObjTable;
319 case PrivilegeObject::TABLE:
321 case PrivilegeObject::VIEW:
322 eNumType = adPermObjView;
324 case PrivilegeObject::COLUMN:
325 eNumType = adPermObjColumn;
333 sal_Int32 nRight = 0;
334 if(_eNum & adRightRead)
335 nRight |= Privilege::SELECT;
336 if(_eNum & adRightInsert)
337 nRight |= Privilege::INSERT;
338 if(_eNum & adRightUpdate)
339 nRight |= Privilege::UPDATE;
340 if(_eNum & adRightDelete)
341 nRight |= Privilege::DELETE;
342 if(_eNum & adRightReadDesign)
343 nRight |= Privilege::READ;
344 if(_eNum & adRightCreate)
345 nRight |= Privilege::CREATE;
346 if(_eNum & adRightWriteDesign)
347 nRight |= Privilege::ALTER;
348 if(_eNum & adRightReference)
349 nRight |= Privilege::REFERENCE;
350 if(_eNum & adRightDrop)
351 nRight |= Privilege::DROP;
358 sal_Int32 nRight = adRightNone;
359 if(_eNum & Privilege::SELECT)
360 nRight |= adRightRead;
362 if(_eNum & Privilege::INSERT)
363 nRight |= adRightInsert;
365 if(_eNum & Privilege::UPDATE)
366 nRight |= adRightUpdate;
368 if(_eNum & Privilege::DELETE)
369 nRight |= adRightDelete;
371 if(_eNum & Privilege::READ)
372 nRight |= adRightReadDesign;
374 if(_eNum & Privilege::CREATE)
375 nRight |= adRightCreate;
377 if(_eNum & Privilege::ALTER)
378 nRight |= adRightWriteDesign;
380 if(_eNum & Privilege::REFERENCE)
381 nRight |= adRightReference;
383 if(_eNum & Privilege::DROP)
384 nRight |= adRightDrop;
386 return static_cast<RightsEnum
>(nRight);
424 sal_Int32 eNum = KeyRule::NO_ACTION;
428 eNum = KeyRule::CASCADE;
431 eNum = KeyRule::SET_NULL;
434 eNum = KeyRule::NO_ACTION;
437 eNum = KeyRule::SET_DEFAULT;
445 RuleEnum eNum = adRINone;
448 case KeyRule::CASCADE:
451 case KeyRule::SET_NULL:
454 case KeyRule::NO_ACTION:
457 case KeyRule::SET_DEFAULT:
458 eNum = adRISetDefault;
466 sal_Int32 nKeyType = KeyType::PRIMARY;
470 nKeyType = KeyType::PRIMARY;
473 nKeyType = KeyType::FOREIGN;
476 nKeyType = KeyType::UNIQUE;
484 KeyTypeEnum eNum( adKeyPrimary );
487 case KeyType::PRIMARY:
490 case KeyType::FOREIGN:
493 case KeyType::UNIQUE:
497 OSL_FAIL(
"OAdoKey::Map2KeyRule: invalid key type!" );
511 sal::systools::BStr aBSTR;
512 sal::systools::BStr sStr1(_rName);
513 pInterface->GetObjectOwner(sStr1, _eNum, _rVar, &aBSTR);
514 return OUString(aBSTR);
static const CLSID CLSID_ADOTABLE_25
static void ThrowException(ADOConnection *_pAdoCon, const css::uno::Reference< css::uno::XInterface > &_xInterface)
static const CLSID CLSID_ADOKEY_25
static const CLSID CLSID_ADOUSER_25
static const CLSID CLSID_ADOINDEX_25
static RightsEnum Map2Right(sal_Int32 _eNum)
static sal_Int32 MapRight(RightsEnum _eNum)
static ObjectTypeEnum MapObjectType(sal_Int32 ObjType)
void fillPropertyValues()
static RuleEnum Map2Rule(sal_Int32 _eNum)
static KeyTypeEnum Map2KeyRule(sal_Int32 _eNum)
void fillPropertyValues()
static sal_Int32 MapRule(const RuleEnum &_eNum)
static sal_Int32 MapKeyRule(const KeyTypeEnum &_eNum)
void fillPropertyValues()
OUString getString() const
OUString GetObjectOwner(std::u16string_view _rName, ObjectTypeEnum _eNum)
bool OpenSchema(SchemaEnum eNum, OLEVariant const &Restrictions, OLEVariant const &SchemaID, ADORecordset **pprset)
void get_Value(OLEVariant &aValVar) const
bool get_Clustered() const
OUString get_Name() const
bool get_PrimaryKey() const
RuleEnum get_DeleteRule() const
KeyTypeEnum get_Type() const
OUString get_RelatedTable() const
RuleEnum get_UpdateRule() const
OUString get_Name() const
WpADOFields GetFields() const
OUString get_Type() const
WpADOProperties get_Properties() const
WpADOCatalog get_ParentCatalog() const
OUString get_Name() const
sal::systools::COMReference< _ADOIndex > pInterface
WrapT GetItem(sal_Int32 index) const
std::shared_ptr< KeyProperties > m_aProps