23#include <com/sun/star/sdbc/DataType.hpp>
45ODatabaseMetaDataResultSet::ODatabaseMetaDataResultSet(
OConnection* _pConnection)
49 ,m_aStatementHandle(_pConnection->createStatementHandle())
50 ,m_pConnection(_pConnection)
51 ,m_nTextEncoding(_pConnection->getTextEncoding())
53 ,m_nDriverColumnCount(0)
54 ,m_nCurrentFetchState(0)
58 OSL_ENSURE(
m_pConnection.is(),
"ODatabaseMetaDataResultSet::ODatabaseMetaDataResultSet: No parent set!");
60 throw RuntimeException();
70 OSL_ENSURE(ODatabaseMetaDataResultSet_BASE::rBHelper.bDisposed,
"Object wasn't disposed!");
71 if(!ODatabaseMetaDataResultSet_BASE::rBHelper.bDisposed)
94 return aRet.hasValue() ? aRet : ODatabaseMetaDataResultSet_BASE::queryInterface(rType);
99 return ::cppu::OPropertySetHelper::createPropertySetInfo(
getInfoHelper());
104 ODatabaseMetaDataResultSet_BASE::acquire();
109 ODatabaseMetaDataResultSet_BASE::release();
118 return ::comphelper::concatSequences(
aTypes.getTypes(),ODatabaseMetaDataResultSet_BASE::getTypes());
123 sal_Int32
map = column;
138 checkDisposed(ODatabaseMetaDataResultSet_BASE::rBHelper.bDisposed);
139 ::osl::MutexGuard aGuard(
m_aMutex );
143 sal_Int32 nLen = xMeta->getColumnCount();
147 if(xMeta->isCaseSensitive(
i) ?
columnName == xMeta->getColumnName(
i) :
148 columnName.equalsIgnoreAsciiCase(xMeta->getColumnName(
i)))
161 ::osl::MutexGuard aGuard(
m_aMutex );
173 return static_cast<T
>(aValueRangeIter->second[nVal]);
198 checkDisposed(ODatabaseMetaDataResultSet_BASE::rBHelper.bDisposed);
199 ::osl::MutexGuard aGuard(
m_aMutex );
217 bRet =
getInt(columnIndex) != 0;
226 return getInteger<sal_Int8, SQL_C_STINYINT>( columnIndex );
233 checkDisposed(ODatabaseMetaDataResultSet_BASE::rBHelper.bDisposed);
234 ::osl::MutexGuard aGuard(
m_aMutex );
244 case DataType::VARCHAR:
245 case DataType::LONGVARCHAR:
261 checkDisposed(ODatabaseMetaDataResultSet_BASE::rBHelper.bDisposed);
262 ::osl::MutexGuard aGuard(
m_aMutex );
273 return Date(aDate.day,aDate.month,aDate.year);
284 checkDisposed(ODatabaseMetaDataResultSet_BASE::rBHelper.bDisposed);
285 ::osl::MutexGuard aGuard(
m_aMutex );
301 checkDisposed(ODatabaseMetaDataResultSet_BASE::rBHelper.bDisposed);
302 ::osl::MutexGuard aGuard(
m_aMutex );
317 return getInteger<sal_Int32, SQL_C_SLONG>( columnIndex );
329 return getInteger<sal_Int64, SQL_C_SBIGINT>( columnIndex );
335 checkDisposed(ODatabaseMetaDataResultSet_BASE::rBHelper.bDisposed);
336 ::osl::MutexGuard aGuard(
m_aMutex );
377 return getInteger<sal_Int16, SQL_C_SSHORT>( columnIndex );
384 checkDisposed(ODatabaseMetaDataResultSet_BASE::rBHelper.bDisposed);
385 ::osl::MutexGuard aGuard(
m_aMutex );
402 checkDisposed(ODatabaseMetaDataResultSet_BASE::rBHelper.bDisposed);
403 ::osl::MutexGuard aGuard(
m_aMutex );
407 TIME_STRUCT aTime={0,0,0};
412 return Time(0, aTime.second,aTime.minute,aTime.hour,
false);
419 checkDisposed(ODatabaseMetaDataResultSet_BASE::rBHelper.bDisposed);
420 ::osl::MutexGuard aGuard(
m_aMutex );
424 TIMESTAMP_STRUCT aTime={0,0,0,0,0,0,0};
429 return DateTime(aTime.fraction, aTime.second, aTime.minute, aTime.hour,
430 aTime.day, aTime.month, aTime.year,
false);
437 checkDisposed(ODatabaseMetaDataResultSet_BASE::rBHelper.bDisposed);
438 ::osl::MutexGuard aGuard(
m_aMutex );
447 checkDisposed(ODatabaseMetaDataResultSet_BASE::rBHelper.bDisposed);
448 ::osl::MutexGuard aGuard(
m_aMutex );
457 checkDisposed(ODatabaseMetaDataResultSet_BASE::rBHelper.bDisposed);
458 ::osl::MutexGuard aGuard(
m_aMutex );
467 checkDisposed(ODatabaseMetaDataResultSet_BASE::rBHelper.bDisposed);
468 ::osl::MutexGuard aGuard(
m_aMutex );
479 checkDisposed(ODatabaseMetaDataResultSet_BASE::rBHelper.bDisposed);
480 ::osl::MutexGuard aGuard(
m_aMutex );
492 checkDisposed(ODatabaseMetaDataResultSet_BASE::rBHelper.bDisposed);
493 ::osl::MutexGuard aGuard(
m_aMutex );
503 checkDisposed(ODatabaseMetaDataResultSet_BASE::rBHelper.bDisposed);
504 ::osl::MutexGuard aGuard(
m_aMutex );
519 checkDisposed(ODatabaseMetaDataResultSet_BASE::rBHelper.bDisposed );
520 ::osl::MutexGuard aGuard(
m_aMutex );
535 checkDisposed(ODatabaseMetaDataResultSet_BASE::rBHelper.bDisposed);
536 ::osl::MutexGuard aGuard(
m_aMutex );
551 checkDisposed(ODatabaseMetaDataResultSet_BASE::rBHelper.bDisposed);
552 ::osl::MutexGuard aGuard(
m_aMutex );
567 checkDisposed(ODatabaseMetaDataResultSet_BASE::rBHelper.bDisposed);
568 ::osl::MutexGuard aGuard(
m_aMutex );
591 checkDisposed(ODatabaseMetaDataResultSet_BASE::rBHelper.bDisposed);
592 ::osl::MutexGuard aGuard(
m_aMutex );
600 checkDisposed(ODatabaseMetaDataResultSet_BASE::rBHelper.bDisposed);
601 ::osl::MutexGuard aGuard(
m_aMutex );
610 checkDisposed(ODatabaseMetaDataResultSet_BASE::rBHelper.bDisposed);
611 ::osl::MutexGuard aGuard(
m_aMutex );
621 checkDisposed(ODatabaseMetaDataResultSet_BASE::rBHelper.bDisposed);
622 ::osl::MutexGuard aGuard(
m_aMutex );
632 checkDisposed(ODatabaseMetaDataResultSet_BASE::rBHelper.bDisposed);
633 ::osl::MutexGuard aGuard(
m_aMutex );
651 checkDisposed(ODatabaseMetaDataResultSet_BASE::rBHelper.bDisposed);
652 ::osl::MutexGuard aGuard(
m_aMutex );
661 checkDisposed(ODatabaseMetaDataResultSet_BASE::rBHelper.bDisposed);
662 ::osl::MutexGuard aGuard(
m_aMutex );
670 checkDisposed(ODatabaseMetaDataResultSet_BASE::rBHelper.bDisposed);
671 ::osl::MutexGuard aGuard(
m_aMutex );
700 return new ::cppu::OPropertyArrayHelper
743 Any & rConvertedValue,
753 throw css::lang::IllegalArgumentException();
755 return ::comphelper::tryPropertyValue(rConvertedValue, rOldValue, rValue,
getFetchDirection());
757 return ::comphelper::tryPropertyValue(rConvertedValue, rOldValue, rValue,
getFetchSize());
773 throw Exception(
"cannot set prop " + OUString::number(nHandle),
nullptr);
775 OSL_FAIL(
"setFastPropertyValue_NoBroadcast: Illegal handle value!");
787 rValue <<= sal_Int32(css::sdbc::ResultSetConcurrency::READ_ONLY);
790 rValue <<= sal_Int32(css::sdbc::ResultSetType::FORWARD_ONLY);
803 ::std::map<sal_Int32,sal_Int32>
aMap;
804 aMap[SQL_BIT] = DataType::BIT;
805 aMap[SQL_TINYINT] = DataType::TINYINT;
806 aMap[SQL_SMALLINT] = DataType::SMALLINT;
807 aMap[SQL_INTEGER] = DataType::INTEGER;
808 aMap[SQL_FLOAT] = DataType::FLOAT;
809 aMap[SQL_REAL] = DataType::REAL;
810 aMap[SQL_DOUBLE] = DataType::DOUBLE;
811 aMap[SQL_BIGINT] = DataType::BIGINT;
813 aMap[SQL_CHAR] = DataType::CHAR;
815 aMap[SQL_VARCHAR] = DataType::VARCHAR;
817 aMap[SQL_LONGVARCHAR] = DataType::LONGVARCHAR;
820 aMap[SQL_TYPE_DATE] = DataType::DATE;
821 aMap[SQL_DATE] = DataType::DATE;
822 aMap[SQL_TYPE_TIME] = DataType::TIME;
823 aMap[SQL_TIME] = DataType::TIME;
824 aMap[SQL_TYPE_TIMESTAMP] = DataType::TIMESTAMP;
825 aMap[SQL_TIMESTAMP] = DataType::TIMESTAMP;
827 aMap[SQL_DECIMAL] = DataType::DECIMAL;
828 aMap[SQL_NUMERIC] = DataType::NUMERIC;
830 aMap[SQL_BINARY] = DataType::BINARY;
831 aMap[SQL_VARBINARY] = DataType::VARBINARY;
832 aMap[SQL_LONGVARBINARY] = DataType::LONGVARBINARY;
834 aMap[SQL_GUID] = DataType::VARBINARY;
844 std::u16string_view tableNamePattern,
847 OString aPKQ,aPKO,aPKN,aCOL;
848 const OUString *pSchemaPat =
nullptr;
850 if(schemaPattern !=
"%")
851 pSchemaPat = &schemaPattern;
853 pSchemaPat =
nullptr;
855 if ( catalog.hasValue() )
860 const char *pPKQ = catalog.hasValue() && !aPKQ.isEmpty() ? aPKQ.getStr() :
nullptr,
861 *pPKO = pSchemaPat && !pSchemaPat->isEmpty() && !aPKO.isEmpty() ? aPKO.getStr() :
nullptr,
862 *pPKN = aPKN.getStr();
865 const char *pCOL =
nullptr;
866 const char*
const pComma =
",";
867 const OUString* pBegin = types.getConstArray();
868 const OUString* pEnd = pBegin + types.getLength();
869 for(;pBegin != pEnd;++pBegin)
873 if ( !aCOL.isEmpty() )
875 aCOL = aCOL.replaceAt(aCOL.getLength()-1,1,pComma);
876 pCOL = aCOL.getStr();
879 pCOL = SQL_ALL_TABLE_TYPES;
882 reinterpret_cast<SDB_ODBC_CHAR *
>(
const_cast<char *
>(pPKQ)), (catalog.hasValue() && !aPKQ.isEmpty()) ? SQL_NTS : 0,
883 reinterpret_cast<SDB_ODBC_CHAR *
>(
const_cast<char *
>(pPKO)), pPKO ? SQL_NTS : 0,
884 reinterpret_cast<SDB_ODBC_CHAR *
>(
const_cast<char *
>(pPKN)), SQL_NTS,
885 reinterpret_cast<SDB_ODBC_CHAR *
>(
const_cast<char *
>(pCOL)), pCOL ? SQL_NTS : 0);
897 reinterpret_cast<SDB_ODBC_CHAR *
>(
const_cast<char *
>(SQL_ALL_TABLE_TYPES)),SQL_NTS);
910 reinterpret_cast<SDB_ODBC_CHAR *
>(
const_cast<char *
>(SQL_ALL_CATALOGS)),SQL_NTS,
911 reinterpret_cast<SDB_ODBC_CHAR *
>(
const_cast<char *
>(
"")),SQL_NTS,
912 reinterpret_cast<SDB_ODBC_CHAR *
>(
const_cast<char *
>(
"")),SQL_NTS,
913 reinterpret_cast<SDB_ODBC_CHAR *
>(
const_cast<char *
>(
"")),SQL_NTS);
927 reinterpret_cast<SDB_ODBC_CHAR *
>(
const_cast<char *
>(
"")),SQL_NTS,
928 reinterpret_cast<SDB_ODBC_CHAR *
>(
const_cast<char *
>(SQL_ALL_SCHEMAS)),SQL_NTS,
929 reinterpret_cast<SDB_ODBC_CHAR *
>(
const_cast<char *
>(
"")),SQL_NTS,
930 reinterpret_cast<SDB_ODBC_CHAR *
>(
const_cast<char *
>(
"")),SQL_NTS);
941 std::u16string_view table,
942 std::u16string_view columnNamePattern )
944 const OUString *pSchemaPat =
nullptr;
947 pSchemaPat = &schema;
949 pSchemaPat =
nullptr;
951 OString aPKQ,aPKO,aPKN,aCOL;
953 if ( catalog.hasValue() )
959 const char *pPKQ = catalog.hasValue() && !aPKQ.isEmpty() ? aPKQ.getStr() :
nullptr,
960 *pPKO = pSchemaPat && !pSchemaPat->isEmpty() && !aPKO.isEmpty() ? aPKO.getStr() :
nullptr,
961 *pPKN = aPKN.getStr(),
962 *pCOL = aCOL.getStr();
966 reinterpret_cast<SDB_ODBC_CHAR *
>(
const_cast<char *
>(pPKQ)), (catalog.hasValue() && !aPKQ.isEmpty()) ? SQL_NTS : 0,
967 reinterpret_cast<SDB_ODBC_CHAR *
>(
const_cast<char *
>(pPKO)), pPKO ? SQL_NTS : 0 ,
968 reinterpret_cast<SDB_ODBC_CHAR *
>(
const_cast<char *
>(pPKN)), SQL_NTS,
969 reinterpret_cast<SDB_ODBC_CHAR *
>(
const_cast<char *
>(pCOL)), SQL_NTS);
976 std::u16string_view tableNamePattern, std::u16string_view columnNamePattern )
978 const OUString *pSchemaPat =
nullptr;
980 if(schemaPattern !=
"%")
981 pSchemaPat = &schemaPattern;
983 pSchemaPat =
nullptr;
985 OString aPKQ,aPKO,aPKN,aCOL;
986 if ( catalog.hasValue() )
992 const char *pPKQ = catalog.hasValue() && !aPKQ.isEmpty() ? aPKQ.getStr() :
nullptr,
993 *pPKO = pSchemaPat && !pSchemaPat->isEmpty() && !aPKO.isEmpty() ? aPKO.getStr() :
nullptr,
994 *pPKN = aPKN.getStr(),
995 *pCOL = aCOL.getStr();
999 reinterpret_cast<SDB_ODBC_CHAR *
>(
const_cast<char *
>(pPKQ)), (catalog.hasValue() && !aPKQ.isEmpty()) ? SQL_NTS : 0,
1000 reinterpret_cast<SDB_ODBC_CHAR *
>(
const_cast<char *
>(pPKO)), pPKO ? SQL_NTS : 0,
1001 reinterpret_cast<SDB_ODBC_CHAR *
>(
const_cast<char *
>(pPKN)), SQL_NTS,
1002 reinterpret_cast<SDB_ODBC_CHAR *
>(
const_cast<char *
>(pCOL)), SQL_NTS);
1005 ::std::map<sal_Int32,sal_Int32>
aMap;
1006 aMap[SQL_BIT] = DataType::BIT;
1007 aMap[SQL_TINYINT] = DataType::TINYINT;
1008 aMap[SQL_SMALLINT] = DataType::SMALLINT;
1009 aMap[SQL_INTEGER] = DataType::INTEGER;
1010 aMap[SQL_FLOAT] = DataType::FLOAT;
1011 aMap[SQL_REAL] = DataType::REAL;
1012 aMap[SQL_DOUBLE] = DataType::DOUBLE;
1013 aMap[SQL_BIGINT] = DataType::BIGINT;
1015 aMap[SQL_CHAR] = DataType::CHAR;
1017 aMap[SQL_VARCHAR] = DataType::VARCHAR;
1019 aMap[SQL_LONGVARCHAR] = DataType::LONGVARCHAR;
1022 aMap[SQL_TYPE_DATE] = DataType::DATE;
1023 aMap[SQL_DATE] = DataType::DATE;
1024 aMap[SQL_TYPE_TIME] = DataType::TIME;
1025 aMap[SQL_TIME] = DataType::TIME;
1026 aMap[SQL_TYPE_TIMESTAMP] = DataType::TIMESTAMP;
1027 aMap[SQL_TIMESTAMP] = DataType::TIMESTAMP;
1029 aMap[SQL_DECIMAL] = DataType::DECIMAL;
1030 aMap[SQL_NUMERIC] = DataType::NUMERIC;
1032 aMap[SQL_BINARY] = DataType::BINARY;
1033 aMap[SQL_VARBINARY] = DataType::VARBINARY;
1034 aMap[SQL_LONGVARBINARY] = DataType::LONGVARBINARY;
1036 aMap[SQL_GUID] = DataType::VARBINARY;
1043 std::u16string_view procedureNamePattern,std::u16string_view columnNamePattern )
1045 const OUString *pSchemaPat =
nullptr;
1047 if(schemaPattern !=
"%")
1048 pSchemaPat = &schemaPattern;
1050 pSchemaPat =
nullptr;
1052 OString aPKQ,aPKO,aPKN,aCOL;
1053 if ( catalog.hasValue() )
1059 const char *pPKQ = catalog.hasValue() && !aPKQ.isEmpty() ? aPKQ.getStr() :
nullptr,
1060 *pPKO = pSchemaPat && !pSchemaPat->isEmpty() && !aPKO.isEmpty() ? aPKO.getStr() :
nullptr,
1061 *pPKN = aPKN.getStr(),
1062 *pCOL = aCOL.getStr();
1066 reinterpret_cast<SDB_ODBC_CHAR *
>(
const_cast<char *
>(pPKQ)), (catalog.hasValue() && !aPKQ.isEmpty()) ? SQL_NTS : 0,
1067 reinterpret_cast<SDB_ODBC_CHAR *
>(
const_cast<char *
>(pPKO)), pPKO ? SQL_NTS : 0 ,
1068 reinterpret_cast<SDB_ODBC_CHAR *
>(
const_cast<char *
>(pPKN)), SQL_NTS,
1069 reinterpret_cast<SDB_ODBC_CHAR *
>(
const_cast<char *
>(pCOL)), SQL_NTS);
1076 std::u16string_view procedureNamePattern)
1078 const OUString *pSchemaPat =
nullptr;
1080 if(schemaPattern !=
"%")
1081 pSchemaPat = &schemaPattern;
1083 pSchemaPat =
nullptr;
1085 OString aPKQ,aPKO,aPKN;
1087 if ( catalog.hasValue() )
1092 const char *pPKQ = catalog.hasValue() && !aPKQ.isEmpty() ? aPKQ.getStr() :
nullptr,
1093 *pPKO = pSchemaPat && !pSchemaPat->isEmpty() && !aPKO.isEmpty() ? aPKO.getStr() :
nullptr,
1094 *pPKN = aPKN.getStr();
1098 reinterpret_cast<SDB_ODBC_CHAR *
>(
const_cast<char *
>(pPKQ)), (catalog.hasValue() && !aPKQ.isEmpty()) ? SQL_NTS : 0,
1099 reinterpret_cast<SDB_ODBC_CHAR *
>(
const_cast<char *
>(pPKO)), pPKO ? SQL_NTS : 0 ,
1100 reinterpret_cast<SDB_ODBC_CHAR *
>(
const_cast<char *
>(pPKN)), SQL_NTS);
1106 std::u16string_view table,sal_Int32 scope,
bool nullable )
1112 static constexpr OUStringLiteral errMsg
1113 =
u"ODBC: Trying to get special columns of empty table name";
1114 static constexpr OUStringLiteral SQLState =
u"HY009";
1115 throw SQLException( errMsg, *
this, SQLState, -1,
Any() );
1118 const OUString *pSchemaPat =
nullptr;
1121 pSchemaPat = &schema;
1123 pSchemaPat =
nullptr;
1125 OString aPKQ,aPKO,aPKN;
1126 if ( catalog.hasValue() )
1131 const char *pPKQ = catalog.hasValue() && !aPKQ.isEmpty() ? aPKQ.getStr() :
nullptr,
1132 *pPKO = pSchemaPat && !pSchemaPat->isEmpty() && !aPKO.isEmpty() ? aPKO.getStr() :
nullptr,
1133 *pPKN = aPKN.getStr();
1137 reinterpret_cast<SDB_ODBC_CHAR *
>(
const_cast<char *
>(pPKQ)), (catalog.hasValue() && !aPKQ.isEmpty()) ? SQL_NTS : 0,
1138 reinterpret_cast<SDB_ODBC_CHAR *
>(
const_cast<char *
>(pPKO)), pPKO ? SQL_NTS : 0 ,
1139 reinterpret_cast<SDB_ODBC_CHAR *
>(
const_cast<char *
>(pPKN)), SQL_NTS,
1140 static_cast<SQLSMALLINT
>(scope),
1141 nullable ? SQL_NULLABLE : SQL_NO_NULLS);
1147 std::u16string_view table)
1153 std::u16string_view table,sal_Int32 scope,
bool nullable )
1159 const OUString* table,
1160 const Any& catalog2,
const OUString* schema2,
1161 const OUString* table2)
1163 OString aPKQ, aPKO, aPKN, aFKQ, aFKO, aFKN;
1164 if ( catalog.hasValue() )
1166 if ( catalog2.hasValue() )
1169 const char *pPKQ = catalog.hasValue() && !aPKQ.isEmpty() ? aPKQ.getStr() :
nullptr;
1170 const char *pPKO =
nullptr;
1171 if (schema && !schema->isEmpty())
1174 pPKO = aPKO.getStr();
1176 const char *pPKN =
nullptr;
1180 pPKN = aPKN.getStr();
1182 const char *pFKQ = catalog2.hasValue() && !aFKQ.isEmpty() ? aFKQ.getStr() :
nullptr;
1183 const char *pFKO =
nullptr;
1184 if (schema2 && !schema2->isEmpty())
1187 pFKO = aFKO.getStr();
1189 const char *pFKN =
nullptr;
1193 pFKN = aFKN.getStr();
1197 reinterpret_cast<SDB_ODBC_CHAR *
>(
const_cast<char *
>(pPKQ)), (catalog.hasValue() && !aPKQ.isEmpty()) ? SQL_NTS : 0,
1198 reinterpret_cast<SDB_ODBC_CHAR *
>(
const_cast<char *
>(pPKO)), pPKO ? SQL_NTS : 0,
1199 reinterpret_cast<SDB_ODBC_CHAR *
>(
const_cast<char *
>(pPKN)), pPKN ? SQL_NTS : 0,
1200 reinterpret_cast<SDB_ODBC_CHAR *
>(
const_cast<char *
>(pFKQ)), (catalog2.hasValue() && !aFKQ.isEmpty()) ? SQL_NTS : 0,
1201 reinterpret_cast<SDB_ODBC_CHAR *
>(
const_cast<char *
>(pFKO)), pFKO ? SQL_NTS : 0,
1202 reinterpret_cast<SDB_ODBC_CHAR *
>(
const_cast<char *
>(pFKN)), SQL_NTS
1209 const OUString& table)
1216 const OUString& table)
1222 std::u16string_view table)
1224 const OUString *pSchemaPat =
nullptr;
1227 pSchemaPat = &schema;
1229 pSchemaPat =
nullptr;
1231 OString aPKQ,aPKO,aPKN;
1233 if ( catalog.hasValue() )
1238 const char *pPKQ = catalog.hasValue() && !aPKQ.isEmpty() ? aPKQ.getStr() :
nullptr,
1239 *pPKO = pSchemaPat && !pSchemaPat->isEmpty() && !aPKO.isEmpty() ? aPKO.getStr() :
nullptr,
1240 *pPKN = aPKN.getStr();
1244 reinterpret_cast<SDB_ODBC_CHAR *
>(
const_cast<char *
>(pPKQ)), (catalog.hasValue() && !aPKQ.isEmpty()) ? SQL_NTS : 0,
1245 reinterpret_cast<SDB_ODBC_CHAR *
>(
const_cast<char *
>(pPKO)), pPKO ? SQL_NTS : 0 ,
1246 reinterpret_cast<SDB_ODBC_CHAR *
>(
const_cast<char *
>(pPKN)), SQL_NTS);
1252 std::u16string_view tableNamePattern)
1254 const OUString *pSchemaPat =
nullptr;
1256 if(schemaPattern !=
"%")
1257 pSchemaPat = &schemaPattern;
1259 pSchemaPat =
nullptr;
1261 OString aPKQ,aPKO,aPKN;
1263 if ( catalog.hasValue() )
1268 const char *pPKQ = catalog.hasValue() && !aPKQ.isEmpty() ? aPKQ.getStr() :
nullptr,
1269 *pPKO = pSchemaPat && !pSchemaPat->isEmpty() && !aPKO.isEmpty() ? aPKO.getStr() :
nullptr,
1270 *pPKN = aPKN.getStr();
1273 reinterpret_cast<SDB_ODBC_CHAR *
>(
const_cast<char *
>(pPKQ)), (catalog.hasValue() && !aPKQ.isEmpty()) ? SQL_NTS : 0,
1274 reinterpret_cast<SDB_ODBC_CHAR *
>(
const_cast<char *
>(pPKO)), pPKO ? SQL_NTS : 0 ,
1275 reinterpret_cast<SDB_ODBC_CHAR *
>(
const_cast<char *
>(pPKN)), SQL_NTS);
1281 std::u16string_view table,
bool unique,
bool approximate )
1283 const OUString *pSchemaPat =
nullptr;
1286 pSchemaPat = &schema;
1288 pSchemaPat =
nullptr;
1290 OString aPKQ,aPKO,aPKN;
1292 if ( catalog.hasValue() )
1297 const char *pPKQ = catalog.hasValue() && !aPKQ.isEmpty() ? aPKQ.getStr() :
nullptr,
1298 *pPKO = pSchemaPat && !pSchemaPat->isEmpty() && !aPKO.isEmpty() ? aPKO.getStr() :
nullptr,
1299 *pPKN = aPKN.getStr();
1302 reinterpret_cast<SDB_ODBC_CHAR *
>(
const_cast<char *
>(pPKQ)), (catalog.hasValue() && !aPKQ.isEmpty()) ? SQL_NTS : 0,
1303 reinterpret_cast<SDB_ODBC_CHAR *
>(
const_cast<char *
>(pPKO)), pPKO ? SQL_NTS : 0 ,
1304 reinterpret_cast<SDB_ODBC_CHAR *
>(
const_cast<char *
>(pPKN)), SQL_NTS,
1305 unique ? SQL_INDEX_UNIQUE : SQL_INDEX_ALL,
1306 approximate ? 1 : 0);
1313 sal_Int16 nNumResultCols=0;
1327 return aFind->second;
#define N3SQLSpecialColumns(a, b, c, d, e, f, g, h, i, j)
#define N3SQLColumns(a, b, c, d, e, f, g, h, i)
#define N3SQLColumnPrivileges(a, b, c, d, e, f, g, h, i)
#define N3SQLForeignKeys(a, b, c, d, e, f, g, h, i, j, k, l, m)
#define N3SQLProcedureColumns(a, b, c, d, e, f, g, h, i)
#define N3SQLStatistics(a, b, c, d, e, f, g, h, i)
#define N3SQLFetchScroll(a, b, c)
#define N3SQLNumResultCols(a, b)
#define N3SQLGetTypeInfo(a, b)
#define N3SQLTablePrivileges(a, b, c, d, e, f, g)
#define N3SQLPrimaryKeys(a, b, c, d, e, f, g)
#define N3SQLTables(a, b, c, d, e, f, g, h, i)
#define N3SQLProcedures(a, b, c, d, e, f, g)
::cppu::IPropertyArrayHelper * getArrayHelper()
void disposing(std::unique_lock< std::mutex > &rGuard)
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
mutable::osl::Mutex m_aMutex
OBroadcastHelper & rBHelper
css::uno::Type const & get()
OUString getString(const Any &_rAny)
::cppu::WeakComponentImplHelper< css::sdbc::XResultSet, css::sdbc::XRow, css::sdbc::XResultSetMetaDataSupplier, css::util::XCancellable, css::sdbc::XWarningsSupplier, css::sdbc::XCloseable, css::sdbc::XColumnLocate > ODatabaseMetaDataResultSet_BASE
void checkDisposed(bool _bThrow)
OString OUStringToOString(std::u16string_view str, ConnectionSettings const *settings)
HashMap_OWString_Interface aMap
#define PROPERTY_ID_RESULTSETTYPE
#define PROPERTY_ID_CURSORNAME
#define PROPERTY_ID_RESULTSETCONCURRENCY
#define PROPERTY_ID_FETCHSIZE
#define PROPERTY_ID_FETCHDIRECTION
std::map< OUString, rtl::Reference< Entity > > map