1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #include "mysqlc_databasemetadata.hxx"
21 #include <com/sun/star/sdbc/DataType.hpp>
22 #include <com/sun/star/sdbc/ResultSetType.hpp>
23 #include <com/sun/star/sdbc/ResultSetConcurrency.hpp>
24 #include <com/sun/star/sdbc/TransactionIsolation.hpp>
25 #include <com/sun/star/sdbc/KeyRule.hpp>
26 #include <com/sun/star/sdbc/Deferrability.hpp>
27 #include <com/sun/star/sdbc/IndexType.hpp>
28 #include <com/sun/star/sdbc/BestRowScope.hpp>
29 #include <com/sun/star/sdbc/ColumnType.hpp>
30 #include <com/sun/star/lang/XInitialization.hpp>
31 #include <comphelper/sequence.hxx>
33 #include <sal/log.hxx>
34 #include <rtl/ustrbuf.hxx>
35 #include "mysqlc_general.hxx"
36 #include "mysqlc_statement.hxx"
37 #include "mysqlc_driver.hxx"
38 #include "mysqlc_preparedstatement.hxx"
41 #include <sal/macros.h>
43 using namespace connectivity::mysqlc
;
44 using namespace com::sun::star::uno
;
45 using namespace com::sun::star::lang
;
46 using namespace com::sun::star::beans
;
47 using namespace com::sun::star::sdbc
;
49 static std::string
wild("%");
51 static void lcl_setRows_throw(const Reference
<XResultSet
>& _xResultSet
, sal_Int32 _nType
,
52 const std::vector
<std::vector
<Any
>>& _rRows
)
54 Reference
<XInitialization
> xIni(_xResultSet
, UNO_QUERY
);
55 Sequence
<Any
> aArgs(2);
58 Sequence
<Sequence
<Any
>> aRows(_rRows
.size());
60 Sequence
<Any
>* pRowsIter
= aRows
.getArray();
61 for (const auto& rRow
: _rRows
)
65 (*pRowsIter
) = comphelper::containerToSequence(rRow
);
70 xIni
->initialize(aArgs
);
73 ODatabaseMetaData::ODatabaseMetaData(OConnection
& _rCon
, MYSQL
* pMySql
)
74 : m_rConnection(_rCon
)
79 ODatabaseMetaData::~ODatabaseMetaData() {}
81 OUString SAL_CALL
ODatabaseMetaData::getCatalogSeparator() { return OUString(); }
83 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxBinaryLiteralLength() { return 16777208L; }
85 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxRowSize()
87 return 2147483647L - 8; // Max buffer size - HEADER
90 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxCatalogNameLength() { return 32; }
92 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxCharLiteralLength() { return 16777208; }
94 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxColumnNameLength() { return 64; }
96 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxColumnsInIndex() { return 16; }
98 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxCursorNameLength() { return 64; }
100 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxConnections()
102 SAL_WARN("connectivity.mysqlc", "method not implemented");
104 // SELECT @@max_connections
108 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxColumnsInTable() { return 512; }
110 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxStatementLength()
112 SAL_WARN("connectivity.mysqlc", "method not implemented");
114 // "SHOW VARIABLES LIKE 'max_allowed_packet'"
118 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxTableNameLength() { return 64; }
120 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxTablesInSelect() { return 256; }
122 sal_Bool SAL_CALL
ODatabaseMetaData::doesMaxRowSizeIncludeBlobs() { return true; }
124 sal_Bool SAL_CALL
ODatabaseMetaData::storesLowerCaseQuotedIdentifiers()
126 SAL_WARN("connectivity.mysqlc", "method not implemented");
131 sal_Bool SAL_CALL
ODatabaseMetaData::storesLowerCaseIdentifiers()
133 SAL_WARN("connectivity.mysqlc", "method not implemented");
138 sal_Bool SAL_CALL
ODatabaseMetaData::storesMixedCaseQuotedIdentifiers()
140 SAL_WARN("connectivity.mysqlc", "method not implemented");
145 sal_Bool SAL_CALL
ODatabaseMetaData::storesMixedCaseIdentifiers()
148 SAL_WARN("connectivity.mysqlc", "method not implemented");
152 sal_Bool SAL_CALL
ODatabaseMetaData::storesUpperCaseQuotedIdentifiers()
155 SAL_WARN("connectivity.mysqlc", "method not implemented");
159 sal_Bool SAL_CALL
ODatabaseMetaData::storesUpperCaseIdentifiers()
162 SAL_WARN("connectivity.mysqlc", "method not implemented");
166 sal_Bool SAL_CALL
ODatabaseMetaData::supportsAlterTableWithAddColumn() { return true; }
168 sal_Bool SAL_CALL
ODatabaseMetaData::supportsAlterTableWithDropColumn() { return true; }
170 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxIndexLength() { return 256; }
172 sal_Bool SAL_CALL
ODatabaseMetaData::supportsNonNullableColumns() { return true; }
174 OUString SAL_CALL
ODatabaseMetaData::getCatalogTerm() { return OUString("n/a"); }
176 OUString SAL_CALL
ODatabaseMetaData::getIdentifierQuoteString() { return OUString("\""); }
178 OUString SAL_CALL
ODatabaseMetaData::getExtraNameCharacters() { return OUString("#@"); }
180 sal_Bool SAL_CALL
ODatabaseMetaData::supportsDifferentTableCorrelationNames() { return true; }
182 sal_Bool SAL_CALL
ODatabaseMetaData::isCatalogAtStart() { return true; }
184 sal_Bool SAL_CALL
ODatabaseMetaData::dataDefinitionIgnoredInTransactions() { return false; }
186 sal_Bool SAL_CALL
ODatabaseMetaData::dataDefinitionCausesTransactionCommit() { return true; }
188 sal_Bool SAL_CALL
ODatabaseMetaData::supportsDataManipulationTransactionsOnly() { return false; }
190 sal_Bool SAL_CALL
ODatabaseMetaData::supportsDataDefinitionAndDataManipulationTransactions()
195 sal_Bool SAL_CALL
ODatabaseMetaData::supportsPositionedDelete() { return false; }
197 sal_Bool SAL_CALL
ODatabaseMetaData::supportsPositionedUpdate() { return false; }
199 sal_Bool SAL_CALL
ODatabaseMetaData::supportsOpenStatementsAcrossRollback() { return false; }
201 sal_Bool SAL_CALL
ODatabaseMetaData::supportsOpenStatementsAcrossCommit() { return false; }
203 sal_Bool SAL_CALL
ODatabaseMetaData::supportsOpenCursorsAcrossCommit() { return false; }
205 sal_Bool SAL_CALL
ODatabaseMetaData::supportsOpenCursorsAcrossRollback() { return false; }
207 sal_Bool SAL_CALL
ODatabaseMetaData::supportsTransactionIsolationLevel(sal_Int32
/*level*/)
212 sal_Bool SAL_CALL
ODatabaseMetaData::supportsSchemasInDataManipulation() { return true; }
214 sal_Bool SAL_CALL
ODatabaseMetaData::supportsANSI92FullSQL() { return false; }
216 sal_Bool SAL_CALL
ODatabaseMetaData::supportsANSI92EntryLevelSQL() { return true; }
218 sal_Bool SAL_CALL
ODatabaseMetaData::supportsIntegrityEnhancementFacility() { return false; }
220 sal_Bool SAL_CALL
ODatabaseMetaData::supportsSchemasInIndexDefinitions() { return true; }
222 sal_Bool SAL_CALL
ODatabaseMetaData::supportsSchemasInTableDefinitions() { return true; }
224 sal_Bool SAL_CALL
ODatabaseMetaData::supportsCatalogsInTableDefinitions() { return false; }
226 sal_Bool SAL_CALL
ODatabaseMetaData::supportsCatalogsInIndexDefinitions() { return false; }
228 sal_Bool SAL_CALL
ODatabaseMetaData::supportsCatalogsInDataManipulation() { return false; }
230 sal_Bool SAL_CALL
ODatabaseMetaData::supportsOuterJoins() { return true; }
232 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxStatements() { return 0; }
234 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxProcedureNameLength() { return 64; }
236 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxSchemaNameLength() { return 64; }
238 sal_Bool SAL_CALL
ODatabaseMetaData::supportsTransactions() { return true; }
240 sal_Bool SAL_CALL
ODatabaseMetaData::allProceduresAreCallable() { return false; }
242 sal_Bool SAL_CALL
ODatabaseMetaData::supportsStoredProcedures()
244 return m_rConnection
.getMysqlVersion() >= 50000;
247 sal_Bool SAL_CALL
ODatabaseMetaData::supportsSelectForUpdate()
249 return m_rConnection
.getMysqlVersion() >= 40000;
252 sal_Bool SAL_CALL
ODatabaseMetaData::allTablesAreSelectable() { return false; }
254 sal_Bool SAL_CALL
ODatabaseMetaData::isReadOnly() { return false; }
256 sal_Bool SAL_CALL
ODatabaseMetaData::usesLocalFiles() { return false; }
258 sal_Bool SAL_CALL
ODatabaseMetaData::usesLocalFilePerTable() { return false; }
260 sal_Bool SAL_CALL
ODatabaseMetaData::supportsTypeConversion() { return true; }
262 sal_Bool SAL_CALL
ODatabaseMetaData::nullPlusNonNullIsNull() { return true; }
264 sal_Bool SAL_CALL
ODatabaseMetaData::supportsColumnAliasing() { return true; }
266 sal_Bool SAL_CALL
ODatabaseMetaData::supportsTableCorrelationNames() { return true; }
268 sal_Bool SAL_CALL
ODatabaseMetaData::supportsConvert(sal_Int32
/*fromType*/, sal_Int32
/*toType*/)
271 SAL_WARN("connectivity.mysqlc", "method not implemented");
275 sal_Bool SAL_CALL
ODatabaseMetaData::supportsExpressionsInOrderBy() { return true; }
277 sal_Bool SAL_CALL
ODatabaseMetaData::supportsGroupBy() { return true; }
279 sal_Bool SAL_CALL
ODatabaseMetaData::supportsGroupByBeyondSelect() { return true; }
281 sal_Bool SAL_CALL
ODatabaseMetaData::supportsGroupByUnrelated() { return true; }
283 sal_Bool SAL_CALL
ODatabaseMetaData::supportsMultipleTransactions() { return true; }
285 sal_Bool SAL_CALL
ODatabaseMetaData::supportsMultipleResultSets() { return false; }
287 sal_Bool SAL_CALL
ODatabaseMetaData::supportsLikeEscapeClause() { return true; }
289 sal_Bool SAL_CALL
ODatabaseMetaData::supportsOrderByUnrelated() { return false; }
291 sal_Bool SAL_CALL
ODatabaseMetaData::supportsUnion()
293 return m_rConnection
.getMysqlVersion() >= 40000;
296 sal_Bool SAL_CALL
ODatabaseMetaData::supportsUnionAll()
298 return m_rConnection
.getMysqlVersion() >= 40000;
301 sal_Bool SAL_CALL
ODatabaseMetaData::supportsMixedCaseIdentifiers() { return false; }
303 sal_Bool SAL_CALL
ODatabaseMetaData::supportsMixedCaseQuotedIdentifiers() { return false; }
305 sal_Bool SAL_CALL
ODatabaseMetaData::nullsAreSortedAtEnd() { return false; }
307 sal_Bool SAL_CALL
ODatabaseMetaData::nullsAreSortedAtStart()
309 return m_rConnection
.getMysqlVersion() > 40001 && m_rConnection
.getMysqlVersion() < 40011;
312 sal_Bool SAL_CALL
ODatabaseMetaData::nullsAreSortedHigh() { return false; }
314 sal_Bool SAL_CALL
ODatabaseMetaData::nullsAreSortedLow() { return !nullsAreSortedHigh(); }
316 sal_Bool SAL_CALL
ODatabaseMetaData::supportsSchemasInProcedureCalls()
318 return m_rConnection
.getMysqlVersion() >= 32200;
321 sal_Bool SAL_CALL
ODatabaseMetaData::supportsSchemasInPrivilegeDefinitions()
323 return m_rConnection
.getMysqlVersion() >= 32200;
326 sal_Bool SAL_CALL
ODatabaseMetaData::supportsCatalogsInProcedureCalls() { return false; }
328 sal_Bool SAL_CALL
ODatabaseMetaData::supportsCatalogsInPrivilegeDefinitions() { return false; }
330 sal_Bool SAL_CALL
ODatabaseMetaData::supportsCorrelatedSubqueries()
332 return m_rConnection
.getMysqlVersion() >= 40100;
335 sal_Bool SAL_CALL
ODatabaseMetaData::supportsSubqueriesInComparisons()
337 return m_rConnection
.getMysqlVersion() >= 40100;
340 sal_Bool SAL_CALL
ODatabaseMetaData::supportsSubqueriesInExists()
342 return m_rConnection
.getMysqlVersion() >= 40100;
345 sal_Bool SAL_CALL
ODatabaseMetaData::supportsSubqueriesInIns()
347 return m_rConnection
.getMysqlVersion() >= 40100;
350 sal_Bool SAL_CALL
ODatabaseMetaData::supportsSubqueriesInQuantifieds()
352 return m_rConnection
.getMysqlVersion() >= 40100;
355 sal_Bool SAL_CALL
ODatabaseMetaData::supportsANSI92IntermediateSQL() { return false; }
357 OUString SAL_CALL
ODatabaseMetaData::getURL()
359 return m_rConnection
.getConnectionSettings().connectionURL
;
362 OUString SAL_CALL
ODatabaseMetaData::getUserName()
364 // TODO execute "SELECT USER()"
365 SAL_WARN("connectivity.mysqlc", "method not implemented");
369 OUString SAL_CALL
ODatabaseMetaData::getDriverName() { return OUString("MySQL Connector/OO.org"); }
371 OUString SAL_CALL
ODatabaseMetaData::getDriverVersion() { return OUString("0.9.2"); }
373 OUString SAL_CALL
ODatabaseMetaData::getDatabaseProductVersion()
375 return OStringToOUString(mysql_get_server_info(m_pMySql
),
376 m_rConnection
.getConnectionEncoding());
379 OUString SAL_CALL
ODatabaseMetaData::getDatabaseProductName() { return OUString("MySQL"); }
381 OUString SAL_CALL
ODatabaseMetaData::getProcedureTerm() { return OUString("procedure"); }
383 OUString SAL_CALL
ODatabaseMetaData::getSchemaTerm() { return OUString("database"); }
385 sal_Int32 SAL_CALL
ODatabaseMetaData::getDriverMajorVersion()
388 SAL_WARN("connectivity.mysqlc", "method not implemented");
389 return MARIADBC_VERSION_MAJOR
;
392 sal_Int32 SAL_CALL
ODatabaseMetaData::getDefaultTransactionIsolation()
394 return m_rConnection
.getMysqlVersion() >= 32336 ? TransactionIsolation::READ_COMMITTED
395 : TransactionIsolation::NONE
;
398 sal_Int32 SAL_CALL
ODatabaseMetaData::getDriverMinorVersion()
401 SAL_WARN("connectivity.mysqlc", "method not implemented");
402 return MARIADBC_VERSION_MINOR
;
405 OUString SAL_CALL
ODatabaseMetaData::getSQLKeywords()
407 return OUString("ACCESSIBLE, ADD, ALL,"
408 "ALTER, ANALYZE, AND, AS, ASC, ASENSITIVE, BEFORE,"
409 "BETWEEN, BIGINT, BINARY, BLOB, BOTH, BY, CALL,"
410 "CASCADE, CASE, CHANGE, CHAR, CHARACTER, CHECK,"
411 "COLLATE, COLUMN, CONDITION, CONNECTION, CONSTRAINT,"
412 "CONTINUE, CONVERT, CREATE, CROSS, CURRENT_DATE,"
413 "CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CURSOR,"
414 "DATABASE, DATABASES, DAY_HOUR, DAY_MICROSECOND,"
415 "DAY_MINUTE, DAY_SECOND, DEC, DECIMAL, DECLARE,"
416 "DEFAULT, DELAYED, DELETE, DESC, DESCRIBE,"
417 "DETERMINISTIC, DISTINCT, DISTINCTROW, DIV, DOUBLE,"
418 "DROP, DUAL, EACH, ELSE, ELSEIF, ENCLOSED,"
419 "ESCAPED, EXISTS, EXIT, EXPLAIN, FALSE, FETCH,"
420 "FLOAT, FLOAT4, FLOAT8, FOR, FORCE, FOREIGN, FROM,"
421 "FULLTEXT, GRANT, GROUP, HAVING, HIGH_PRIORITY,"
422 "HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IF,"
423 "IGNORE, IN, INDEX, INFILE, INNER, INOUT,"
424 "INSENSITIVE, INSERT, INT, INT1, INT2, INT3, INT4,"
425 "INT8, INTEGER, INTERVAL, INTO, IS, ITERATE, JOIN,"
426 "KEY, KEYS, KILL, LEADING, LEAVE, LEFT, LIKE,"
427 "LOCALTIMESTAMP, LOCK, LONG, LONGBLOB, LONGTEXT,"
428 "LOOP, LOW_PRIORITY, MATCH, MEDIUMBLOB, MEDIUMINT,"
429 "MEDIUMTEXT, MIDDLEINT, MINUTE_MICROSECOND,"
430 "MINUTE_SECOND, MOD, MODIFIES, NATURAL, NOT,"
431 "NO_WRITE_TO_BINLOG, NULL, NUMERIC, ON, OPTIMIZE,"
432 "OPTION, OPTIONALLY, OR, ORDER, OUT, OUTER,"
433 "OUTFILE, PRECISION, PRIMARY, PROCEDURE, PURGE,"
434 "RANGE, READ, READS, READ_ONLY, READ_WRITE, REAL,"
435 "REFERENCES, REGEXP, RELEASE, RENAME, REPEAT,"
436 "REPLACE, REQUIRE, RESTRICT, RETURN, REVOKE, RIGHT,"
437 "RLIKE, SCHEMA, SCHEMAS, SECOND_MICROSECOND, SELECT,"
438 "SENSITIVE, SEPARATOR, SET, SHOW, SMALLINT, SPATIAL,"
439 "SPECIFIC, SQL, SQLEXCEPTION, SQLSTATE, SQLWARNING,"
440 "SQL_BIG_RESULT, SQL_CALC_FOUND_ROWS, SQL_SMALL_RESULT,"
441 "SSL, STARTING, STRAIGHT_JOIN, TABLE, TERMINATED,"
442 "THEN, TINYBLOB, TINYINT, TINYTEXT, TO, TRAILING,"
443 "TRIGGER, TRUE, UNDO, UNION, UNIQUE, UNLOCK,"
444 "UNSIGNED, UPDATE, USAGE, USE, USING, UTC_DATE,"
445 "UTC_TIME, UTC_TIMESTAMP, VALUES, VARBINARY, VARCHAR,"
446 "VARCHARACTER, VARYING, WHEN, WHERE, WHILE, WITH,"
447 "WRITE, X509, XOR, YEAR_MONTH, ZEROFILL"
448 "GENERAL, IGNORE_SERVER_IDS, MASTER_HEARTBEAT_PERIOD,"
449 "MAXVALUE, RESIGNAL, SIGNAL, SLOW");
452 OUString SAL_CALL
ODatabaseMetaData::getSearchStringEscape() { return OUString("\\"); }
454 OUString SAL_CALL
ODatabaseMetaData::getStringFunctions()
456 return OUString("ASCII,BIN,BIT_LENGTH,CHAR,CHARACTER_LENGTH,CHAR_LENGTH,CONCAT,"
457 "CONCAT_WS,CONV,ELT,EXPORT_SET,FIELD,FIND_IN_SET,HEX,INSERT,"
458 "INSTR,LCASE,LEFT,LENGTH,LOAD_FILE,LOCATE,LOCATE,LOWER,LPAD,"
459 "LTRIM,MAKE_SET,MATCH,MID,OCT,OCTET_LENGTH,ORD,POSITION,"
460 "QUOTE,REPEAT,REPLACE,REVERSE,RIGHT,RPAD,RTRIM,SOUNDEX,"
461 "SPACE,STRCMP,SUBSTRING,SUBSTRING,SUBSTRING,SUBSTRING,"
462 "SUBSTRING_INDEX,TRIM,UCASE,UPPER");
465 OUString SAL_CALL
ODatabaseMetaData::getTimeDateFunctions()
467 return OUString("DAYOFWEEK,WEEKDAY,DAYOFMONTH,DAYOFYEAR,MONTH,DAYNAME,"
468 "MONTHNAME,QUARTER,WEEK,YEAR,HOUR,MINUTE,SECOND,PERIOD_ADD,"
469 "PERIOD_DIFF,TO_DAYS,FROM_DAYS,DATE_FORMAT,TIME_FORMAT,"
470 "CURDATE,CURRENT_DATE,CURTIME,CURRENT_TIME,NOW,SYSDATE,"
471 "CURRENT_TIMESTAMP,UNIX_TIMESTAMP,FROM_UNIXTIME,"
472 "SEC_TO_TIME,TIME_TO_SEC");
475 OUString SAL_CALL
ODatabaseMetaData::getSystemFunctions()
477 return OUString("DATABASE,USER,SYSTEM_USER,"
478 "SESSION_USER,PASSWORD,ENCRYPT,LAST_INSERT_ID,VERSION");
481 OUString SAL_CALL
ODatabaseMetaData::getNumericFunctions()
483 return OUString("ABS,ACOS,ASIN,ATAN,ATAN2,BIT_COUNT,CEILING,COS,"
484 "COT,DEGREES,EXP,FLOOR,LOG,LOG10,MAX,MIN,MOD,PI,POW,"
485 "POWER,RADIANS,RAND,ROUND,SIN,SQRT,TAN,TRUNCATE");
488 sal_Bool SAL_CALL
ODatabaseMetaData::supportsExtendedSQLGrammar() { return false; }
490 sal_Bool SAL_CALL
ODatabaseMetaData::supportsCoreSQLGrammar() { return true; }
492 sal_Bool SAL_CALL
ODatabaseMetaData::supportsMinimumSQLGrammar() { return true; }
494 sal_Bool SAL_CALL
ODatabaseMetaData::supportsFullOuterJoins() { return false; }
496 sal_Bool SAL_CALL
ODatabaseMetaData::supportsLimitedOuterJoins() { return true; }
498 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxColumnsInGroupBy() { return 64; }
500 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxColumnsInOrderBy() { return 64; }
502 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxColumnsInSelect() { return 256; }
504 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxUserNameLength() { return 16; }
506 sal_Bool SAL_CALL
ODatabaseMetaData::supportsResultSetType(sal_Int32 setType
)
508 return setType
== ResultSetType::SCROLL_SENSITIVE
;
511 sal_Bool SAL_CALL
ODatabaseMetaData::supportsResultSetConcurrency(sal_Int32
/*setType*/,
512 sal_Int32
/*concurrency*/)
517 sal_Bool SAL_CALL
ODatabaseMetaData::ownUpdatesAreVisible(sal_Int32
/*setType*/) { return false; }
519 sal_Bool SAL_CALL
ODatabaseMetaData::ownDeletesAreVisible(sal_Int32
/*setType*/) { return false; }
521 sal_Bool SAL_CALL
ODatabaseMetaData::ownInsertsAreVisible(sal_Int32
/*setType*/) { return false; }
523 sal_Bool SAL_CALL
ODatabaseMetaData::othersUpdatesAreVisible(sal_Int32
/*setType*/)
528 sal_Bool SAL_CALL
ODatabaseMetaData::othersDeletesAreVisible(sal_Int32
/*setType*/)
533 sal_Bool SAL_CALL
ODatabaseMetaData::othersInsertsAreVisible(sal_Int32
/*setType*/)
538 sal_Bool SAL_CALL
ODatabaseMetaData::updatesAreDetected(sal_Int32
/*setType*/) { return false; }
540 sal_Bool SAL_CALL
ODatabaseMetaData::deletesAreDetected(sal_Int32
/*setType*/) { return false; }
542 sal_Bool SAL_CALL
ODatabaseMetaData::insertsAreDetected(sal_Int32
/*setType*/) { return false; }
544 sal_Bool SAL_CALL
ODatabaseMetaData::supportsBatchUpdates() { return true; }
546 Reference
<XConnection
> SAL_CALL
ODatabaseMetaData::getConnection() { return &m_rConnection
; }
549 Here follow all methods which return(a resultset
550 the first methods is an example implementation how to use this resultset
551 of course you could implement it on your and you should do this because
552 the general way is more memory expensive
555 Reference
<XResultSet
> SAL_CALL
ODatabaseMetaData::getTableTypes()
557 const char* const table_types
[] = { "TABLE", "VIEW" };
558 sal_Int32
const requiredVersion
[] = { 0, 50000 };
560 Reference
<XResultSet
> xResultSet(getOwnConnection().getDriver().getFactory()->createInstance(
561 "org.openoffice.comp.helper.DatabaseMetaDataResultSet"),
563 std::vector
<std::vector
<Any
>> rRows
;
564 rtl_TextEncoding encoding
= m_rConnection
.getConnectionEncoding();
566 for (sal_uInt32 i
= 0; i
< 2; i
++)
568 if (m_rConnection
.getMysqlVersion() >= requiredVersion
[i
])
570 std::vector
<Any
> aRow
{ Any() };
571 aRow
.push_back(makeAny(mysqlc_sdbc_driver::convert(table_types
[i
], encoding
)));
572 rRows
.push_back(aRow
);
575 lcl_setRows_throw(xResultSet
, 5, rRows
);
579 Reference
<XResultSet
> SAL_CALL
ODatabaseMetaData::getTypeInfo()
581 Reference
<XResultSet
> xResultSet(getOwnConnection().getDriver().getFactory()->createInstance(
582 "org.openoffice.comp.helper.DatabaseMetaDataResultSet"),
585 std::vector
<std::vector
<Any
>> rRows
;
587 rtl_TextEncoding encoding
= m_rConnection
.getConnectionEncoding();
589 while (mysqlc_types
[i
].typeName
)
591 std::vector
<Any
> aRow
{ Any() };
593 aRow
.push_back(makeAny(mysqlc_sdbc_driver::convert(mysqlc_types
[i
].typeName
, encoding
)));
594 aRow
.push_back(makeAny(mysqlc_types
[i
].dataType
));
595 aRow
.push_back(makeAny(mysqlc_types
[i
].precision
));
597 makeAny(mysqlc_sdbc_driver::convert(mysqlc_types
[i
].literalPrefix
, encoding
)));
599 makeAny(mysqlc_sdbc_driver::convert(mysqlc_types
[i
].literalSuffix
, encoding
)));
601 makeAny(mysqlc_sdbc_driver::convert(mysqlc_types
[i
].createParams
, encoding
)));
602 aRow
.push_back(makeAny(mysqlc_types
[i
].nullable
));
603 aRow
.push_back(makeAny(mysqlc_types
[i
].caseSensitive
));
604 aRow
.push_back(makeAny(mysqlc_types
[i
].searchable
));
605 aRow
.push_back(makeAny(mysqlc_types
[i
].isUnsigned
));
606 aRow
.push_back(makeAny(mysqlc_types
[i
].fixedPrecScale
));
607 aRow
.push_back(makeAny(mysqlc_types
[i
].autoIncrement
));
609 makeAny(mysqlc_sdbc_driver::convert(mysqlc_types
[i
].localTypeName
, encoding
)));
610 aRow
.push_back(makeAny(mysqlc_types
[i
].minScale
));
611 aRow
.push_back(makeAny(mysqlc_types
[i
].maxScale
));
612 aRow
.push_back(makeAny(sal_Int32(0)));
613 aRow
.push_back(makeAny(sal_Int32(0)));
614 aRow
.push_back(makeAny(sal_Int32(10)));
616 rRows
.push_back(aRow
);
620 lcl_setRows_throw(xResultSet
, 14, rRows
);
624 Reference
<XResultSet
> SAL_CALL
ODatabaseMetaData::getCatalogs()
626 Reference
<XResultSet
> xResultSet(getOwnConnection().getDriver().getFactory()->createInstance(
627 "org.openoffice.comp.helper.DatabaseMetaDataResultSet"),
632 Reference
<XResultSet
> SAL_CALL
ODatabaseMetaData::getSchemas()
634 Reference
<XResultSet
> xResultSet(getOwnConnection().getDriver().getFactory()->createInstance(
635 "org.openoffice.comp.helper.DatabaseMetaDataResultSet"),
637 std::vector
<std::vector
<Any
>> rRows
;
640 = m_rConnection
.getMysqlVersion() > 49999
641 ? OUString
{ "SELECT SCHEMA_NAME AS TABLE_SCHEM, CATALOG_NAME AS TABLE_CATALOG "
642 "FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME" }
643 : OUString
{ "SHOW DATABASES" };
645 Reference
<XStatement
> statement
= m_rConnection
.createStatement();
646 Reference
<XInterface
> executed
= statement
->executeQuery(sSql
);
647 Reference
<XResultSet
> rs(executed
, UNO_QUERY_THROW
);
648 Reference
<XResultSetMetaDataSupplier
> supp(executed
, UNO_QUERY_THROW
);
649 Reference
<XResultSetMetaData
> rs_meta
= supp
->getMetaData();
651 Reference
<XRow
> xRow(rs
, UNO_QUERY_THROW
);
652 sal_uInt32 columns
= rs_meta
->getColumnCount();
655 std::vector
<Any
> aRow
{ Any() };
656 bool informationSchema
= false;
657 for (sal_uInt32 i
= 1; i
<= columns
; i
++)
659 OUString columnStringValue
= xRow
->getString(i
);
662 informationSchema
= columnStringValue
.equalsIgnoreAsciiCase("information_schema");
664 aRow
.push_back(makeAny(columnStringValue
));
666 if (!informationSchema
)
668 rRows
.push_back(aRow
);
672 lcl_setRows_throw(xResultSet
, 1, rRows
);
676 Reference
<XResultSet
>
677 SAL_CALL
ODatabaseMetaData::getColumnPrivileges(const Any
& /*catalog*/, const OUString
& schema
,
678 const OUString
& table
,
679 const OUString
& columnNamePattern
)
681 OUString
query("SELECT TABLE_CATALOG AS TABLE_CAT, TABLE_SCHEMA AS "
682 "TABLE_SCHEM, TABLE_NAME, COLUMN_NAME, NULL AS GRANTOR, "
683 "GRANTEE, PRIVILEGE_TYPE AS PRIVILEGE, IS_GRANTABLE FROM "
684 "INFORMATION_SCHEMA.COLUMN_PRIVILEGES WHERE TABLE_SCHEMA LIKE "
685 "'?' AND TABLE_NAME='?' AND COLUMN_NAME LIKE '?' ORDER BY "
686 "COLUMN_NAME, PRIVILEGE_TYPE");
688 query
= query
.replaceFirst("?", schema
);
689 query
= query
.replaceFirst("?", table
);
690 query
= query
.replaceFirst("?", columnNamePattern
);
692 Reference
<XStatement
> statement
= m_rConnection
.createStatement();
693 Reference
<XResultSet
> rs
= statement
->executeQuery(query
);
697 Reference
<XResultSet
> SAL_CALL
ODatabaseMetaData::getColumns(const Any
& /*catalog*/,
698 const OUString
& schemaPattern
,
699 const OUString
& tableNamePattern
,
700 const OUString
& columnNamePattern
)
702 OUStringBuffer
queryBuf("SELECT TABLE_CATALOG, " // 1
703 "TABLE_SCHEMA, " // 2
708 "CHARACTER_MAXIMUM_LENGTH, " // 6
709 "NUMERIC_PRECISION, " // 7
710 // buffer length missing
711 "NUMERIC_SCALE AS DECIMAL_DIGITS, " // 8
712 // NUM_PREC_RADIX missing
714 "COLUMN_COMMENT AS REMARKS, " // 9
715 "COLUMN_DEFAULT AS COLUMN_DEF," // 10
716 "CHARACTER_OCTET_LENGTH, " // 11
717 "ORDINAL_POSITION, " // 12
718 "IS_NULLABLE, " // 13
720 "FROM INFORMATION_SCHEMA.COLUMNS "
722 if (!tableNamePattern
.isEmpty())
725 if (tableNamePattern
.match("%"))
726 sAppend
= "AND TABLE_NAME LIKE '%' ";
728 sAppend
= "AND TABLE_NAME = '%' ";
729 queryBuf
.append(sAppend
.replaceAll("%", tableNamePattern
));
731 if (!schemaPattern
.isEmpty())
734 if (schemaPattern
.match("%"))
735 sAppend
= "AND TABLE_SCHEMA LIKE '%' ";
737 sAppend
= "AND TABLE_SCHEMA = '%' ";
738 queryBuf
.append(sAppend
.replaceAll("%", schemaPattern
));
740 if (!columnNamePattern
.isEmpty())
743 if (columnNamePattern
.match("%"))
744 sAppend
= "AND COLUMN_NAME LIKE '%' ";
746 sAppend
= "AND COLUMN_NAME = '%' ";
747 queryBuf
.append(sAppend
.replaceAll("%", columnNamePattern
));
750 OUString query
= queryBuf
.makeStringAndClear();
751 Reference
<XStatement
> statement
= m_rConnection
.createStatement();
752 Reference
<XResultSet
> rs
= statement
->executeQuery(query
.getStr());
753 Reference
<XRow
> xRow(rs
, UNO_QUERY_THROW
);
755 Reference
<XResultSet
> xResultSet(getOwnConnection().getDriver().getFactory()->createInstance(
756 "org.openoffice.comp.helper.DatabaseMetaDataResultSet"),
758 std::vector
<std::vector
<Any
>> aRows
;
761 std::vector
<Any
> aRow
{ Any() }; // 0. element is unused
764 aRow
.push_back(makeAny(xRow
->getString(1)));
766 aRow
.push_back(makeAny(xRow
->getString(2)));
768 aRow
.push_back(makeAny(xRow
->getString(3)));
770 aRow
.push_back(makeAny(xRow
->getString(4)));
772 OUString sDataType
= xRow
->getString(5);
773 aRow
.push_back(makeAny(mysqlc_sdbc_driver::mysqlStrToOOOType(sDataType
)));
775 aRow
.push_back(makeAny(sDataType
)); // TODO
777 sal_Int32 nColumnSize
= 0;
778 OUString sColumnType
= xRow
->getString(14);
779 sal_Int32 nCharMaxLen
= xRow
->getShort(6);
780 bool bIsCharMax
= !xRow
->wasNull();
781 if (sDataType
.equalsIgnoreAsciiCase("year"))
782 nColumnSize
= sColumnType
.copy(6, 1).toInt32(); // 'year(' length is 5
783 else if (sDataType
.equalsIgnoreAsciiCase("date"))
785 else if (sDataType
.equalsIgnoreAsciiCase("time"))
787 else if (sDataType
.equalsIgnoreAsciiCase("datetime")
788 || sDataType
.equalsIgnoreAsciiCase("timestamp"))
790 else if (!bIsCharMax
)
791 nColumnSize
= xRow
->getShort(7); // numeric precision
793 nColumnSize
= nCharMaxLen
;
794 aRow
.push_back(makeAny(nColumnSize
));
795 aRow
.push_back(Any()); // buffer length - unused
796 // decimal digits (scale)
797 aRow
.push_back(makeAny(xRow
->getShort(8)));
799 aRow
.push_back(makeAny(sal_Int32(10)));
801 OUString sIsNullable
= xRow
->getString(13);
803 aRow
.push_back(makeAny(ColumnValue::NULLABLE_UNKNOWN
));
804 else if (sIsNullable
.equalsIgnoreAsciiCase("YES"))
805 aRow
.push_back(makeAny(ColumnValue::NULLABLE
));
807 aRow
.push_back(makeAny(ColumnValue::NO_NULLS
));
809 aRow
.push_back(makeAny(xRow
->getString(9)));
811 aRow
.push_back(makeAny(xRow
->getString(10)));
813 aRow
.push_back(Any
{}); // sql_data_type - unused
814 aRow
.push_back(Any
{}); // sql_datetime_sub - unused
816 // character octet length
817 aRow
.push_back(makeAny(xRow
->getString(11)));
819 aRow
.push_back(makeAny(xRow
->getString(12)));
821 aRow
.push_back(makeAny(sIsNullable
));
822 aRows
.push_back(aRow
);
824 lcl_setRows_throw(xResultSet
, 1, aRows
);
828 Reference
<XResultSet
> SAL_CALL
ODatabaseMetaData::getTables(const Any
& /*catalog*/,
829 const OUString
& schemaPattern
,
830 const OUString
& tableNamePattern
,
831 const Sequence
<OUString
>& types
)
833 OUStringBuffer buffer
{
834 "SELECT TABLE_CATALOG AS TABLE_CAT, TABLE_SCHEMA AS TABLE_SCHEM, TABLE_NAME,"
835 "IF(STRCMP(TABLE_TYPE,'BASE TABLE'), TABLE_TYPE, 'TABLE') AS TABLE_TYPE, TABLE_COMMENT AS "
837 "FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA LIKE '?' AND TABLE_NAME LIKE '?' "
840 if (types
.getLength() == 1)
842 buffer
.append("AND TABLE_TYPE LIKE '");
843 buffer
.append(types
[0]);
846 else if (types
.getLength() > 1)
848 buffer
.append("AND (TABLE_TYPE LIKE '");
849 buffer
.append(types
[0]);
851 for (sal_Int32 i
= 1; i
< types
.getLength(); ++i
)
853 buffer
.append(" OR TABLE_TYPE LIKE '");
854 buffer
.append(types
[i
]);
860 buffer
.append(" ORDER BY TABLE_TYPE, TABLE_SCHEMA, TABLE_NAME");
861 OUString query
= buffer
.makeStringAndClear();
863 // TODO use prepared stmt instead
864 // TODO escape schema, table name ?
865 query
= query
.replaceFirst("?", schemaPattern
);
866 query
= query
.replaceFirst("?", tableNamePattern
);
868 Reference
<XStatement
> statement
= m_rConnection
.createStatement();
869 Reference
<XResultSet
> rs
= statement
->executeQuery(query
);
873 Reference
<XResultSet
> SAL_CALL
ODatabaseMetaData::getProcedureColumns(
874 const Any
& /* catalog */, const OUString
& /* schemaPattern */,
875 const OUString
& /* procedureNamePattern */, const OUString
& /* columnNamePattern */)
877 // Currently there is no information available
881 Reference
<XResultSet
>
882 SAL_CALL
ODatabaseMetaData::getProcedures(const Any
& /*catalog*/,
883 const OUString
& /*schemaPattern*/,
884 const OUString
& /*procedureNamePattern*/)
886 Reference
<XResultSet
> xResultSet(getOwnConnection().getDriver().getFactory()->createInstance(
887 "org.openoffice.comp.helper.DatabaseMetaDataResultSet"),
889 std::vector
<std::vector
<Any
>> rRows
;
891 SAL_WARN("connectivity.mysqlc", "method not implemented");
892 lcl_setRows_throw(xResultSet
, 7, rRows
);
896 Reference
<XResultSet
> SAL_CALL
ODatabaseMetaData::getVersionColumns(const Any
& /* catalog */,
897 const OUString
& /* schema */,
898 const OUString
& /* table */)
900 Reference
<XResultSet
> xResultSet(getOwnConnection().getDriver().getFactory()->createInstance(
901 "org.openoffice.comp.helper.DatabaseMetaDataResultSet"),
903 std::vector
<std::vector
<Any
>> rRows
;
904 lcl_setRows_throw(xResultSet
, 16, rRows
);
908 Reference
<XResultSet
> SAL_CALL
ODatabaseMetaData::getExportedKeys(const Any
& /*catalog */,
909 const OUString
& /*schema */,
910 const OUString
& /*table */)
912 Reference
<XResultSet
> xResultSet(getOwnConnection().getDriver().getFactory()->createInstance(
913 "org.openoffice.comp.helper.DatabaseMetaDataResultSet"),
915 std::vector
<std::vector
<Any
>> rRows
;
917 SAL_WARN("connectivity.mysqlc", "method not implemented");
918 lcl_setRows_throw(xResultSet
, 8, rRows
);
922 Reference
<XResultSet
> SAL_CALL
ODatabaseMetaData::getImportedKeys(const Any
& /*catalog*/,
923 const OUString
& schema
,
924 const OUString
& table
)
926 Reference
<XResultSet
> xResultSet(getOwnConnection().getDriver().getFactory()->createInstance(
927 "org.openoffice.comp.helper.DatabaseMetaDataResultSet"),
930 OUString
query("SELECT refi.CONSTRAINT_CATALOG," // 1: foreign catalog
931 " k.COLUMN_NAME," // 2: foreign column name
932 " refi.UNIQUE_CONSTRAINT_CATALOG," // 3: primary catalog FIXME
933 " k.REFERENCED_TABLE_SCHEMA," // 4: primary schema
934 " refi.REFERENCED_TABLE_NAME," // 5: primary table name
935 " k.REFERENCED_COLUMN_NAME," // 6: primary column name
936 " refi.UPDATE_RULE, refi.DELETE_RULE," // 7,8: update, delete rule
937 " refi.CONSTRAINT_NAME, " // 9: name of constraint itself
938 " refi.TABLE_NAME, " // 10: foreign table name
939 " refi.CONSTRAINT_SCHEMA " // 11: foreign schema name FIXME
940 " FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS as refi"
941 " INNER JOIN INFORMATION_SCHEMA.KEY_COLUMN_USAGE as k ON k.CONSTRAINT_NAME = "
942 "refi.CONSTRAINT_NAME "
943 " and k.TABLE_NAME = refi.TABLE_NAME "
944 " WHERE k.REFERENCED_TABLE_SCHEMA LIKE "
945 "'?' AND refi.TABLE_NAME='?'");
946 query
= query
.replaceFirst("?", schema
); // TODO what if schema is NULL?
947 query
= query
.replaceFirst("?", table
);
949 std::vector
<std::vector
<Any
>> aRows
;
950 Reference
<XStatement
> statement
= m_rConnection
.createStatement();
951 Reference
<XResultSet
> rs
= statement
->executeQuery(query
.getStr());
952 Reference
<XRow
> xRow(rs
, UNO_QUERY_THROW
);
956 std::vector
<Any
> aRow
{ Any() }; // 0. element is unused
958 // primary key catalog
959 aRow
.push_back(makeAny(xRow
->getString(3)));
960 // primary key schema
961 aRow
.push_back(makeAny(xRow
->getString(4)));
963 aRow
.push_back(makeAny(xRow
->getString(5)));
964 // primary column name
965 aRow
.push_back(makeAny(xRow
->getString(6)));
968 aRow
.push_back(makeAny(xRow
->getString(1)));
970 aRow
.push_back(makeAny(xRow
->getString(11)));
972 aRow
.push_back(makeAny(xRow
->getString(10)));
974 aRow
.push_back(makeAny(xRow
->getString(2)));
976 aRow
.push_back(makeAny(sal_Int32
{ 0 })); // TODO
978 aRow
.push_back(makeAny(xRow
->getShort(7)));
980 aRow
.push_back(makeAny(xRow
->getShort(8)));
982 aRow
.push_back(makeAny(xRow
->getString(9)));
984 aRow
.push_back(makeAny(OUString
{})); // TODO
986 aRow
.push_back(makeAny(Deferrability::NONE
));
987 aRows
.push_back(aRow
);
989 lcl_setRows_throw(xResultSet
, 1, aRows
);
993 Reference
<XResultSet
> SAL_CALL
ODatabaseMetaData::getPrimaryKeys(const Any
& /*catalog*/,
994 const OUString
& schema
,
995 const OUString
& table
)
997 OUString
query("SELECT TABLE_CATALOG AS TABLE_CAT, TABLE_SCHEMA "
998 "AS TABLE_SCHEM, TABLE_NAME, "
999 "COLUMN_NAME, SEQ_IN_INDEX AS KEY_SEQ,"
1000 "INDEX_NAME AS PK_NAME FROM INFORMATION_SCHEMA.STATISTICS "
1001 "WHERE TABLE_SCHEMA LIKE '?' AND TABLE_NAME LIKE '?' AND INDEX_NAME='PRIMARY' "
1002 "ORDER BY TABLE_SCHEMA, TABLE_NAME, INDEX_NAME, SEQ_IN_INDEX");
1004 // TODO use prepared stmt instead
1005 // TODO escape schema, table name ?
1006 query
= query
.replaceFirst("?", schema
);
1007 query
= query
.replaceFirst("?", table
);
1009 Reference
<XStatement
> statement
= m_rConnection
.createStatement();
1010 Reference
<XResultSet
> rs
= statement
->executeQuery(query
);
1014 Reference
<XResultSet
> SAL_CALL
ODatabaseMetaData::getIndexInfo(const Any
& /*catalog*/,
1015 const OUString
& /*schema*/,
1016 const OUString
& /*table*/,
1017 sal_Bool
/*unique*/,
1018 sal_Bool
/*approximate*/)
1020 Reference
<XResultSet
> xResultSet(getOwnConnection().getDriver().getFactory()->createInstance(
1021 "org.openoffice.comp.helper.DatabaseMetaDataResultSet"),
1023 std::vector
<std::vector
<Any
>> rRows
;
1025 SAL_WARN("connectivity.mysqlc", "method not implemented");
1026 lcl_setRows_throw(xResultSet
, 11, rRows
);
1030 Reference
<XResultSet
> SAL_CALL
ODatabaseMetaData::getBestRowIdentifier(const Any
& /*catalog*/,
1031 const OUString
& /*schema*/,
1032 const OUString
& /*table*/,
1033 sal_Int32
/*scope*/,
1034 sal_Bool
/*nullable*/)
1036 Reference
<XResultSet
> xResultSet(getOwnConnection().getDriver().getFactory()->createInstance(
1037 "org.openoffice.comp.helper.DatabaseMetaDataResultSet"),
1039 std::vector
<std::vector
<Any
>> rRows
;
1041 SAL_WARN("connectivity.mysqlc", "method not implemented");
1042 lcl_setRows_throw(xResultSet
, 15, rRows
);
1046 Reference
<XResultSet
> SAL_CALL
ODatabaseMetaData::getTablePrivileges(
1047 const Any
& /*catalog*/, const OUString
& /*schemaPattern*/, const OUString
& /*tableNamePattern*/)
1049 Reference
<XResultSet
> xResultSet(getOwnConnection().getDriver().getFactory()->createInstance(
1050 "org.openoffice.comp.helper.DatabaseMetaDataResultSet"),
1052 std::vector
<std::vector
<Any
>> rRows
;
1054 SAL_WARN("connectivity.mysqlc", "method not implemented");
1055 lcl_setRows_throw(xResultSet
, 12, rRows
);
1059 Reference
<XResultSet
> SAL_CALL
ODatabaseMetaData::getCrossReference(
1060 const Any
& /*primaryCatalog*/, const OUString
& /*primarySchema_*/,
1061 const OUString
& /*primaryTable_*/, const Any
& /*foreignCatalog*/,
1062 const OUString
& /*foreignSchema*/, const OUString
& /*foreignTable*/)
1064 Reference
<XResultSet
> xResultSet(getOwnConnection().getDriver().getFactory()->createInstance(
1065 "org.openoffice.comp.helper.DatabaseMetaDataResultSet"),
1067 std::vector
<std::vector
<Any
>> rRows
;
1069 SAL_WARN("connectivity.mysqlc", "method not implemented");
1070 lcl_setRows_throw(xResultSet
, 13, rRows
);
1074 Reference
<XResultSet
> SAL_CALL
ODatabaseMetaData::getUDTs(const Any
& /* catalog */,
1075 const OUString
& /* schemaPattern */,
1076 const OUString
& /* typeNamePattern */,
1077 const Sequence
<sal_Int32
>& /* types */)
1079 mysqlc_sdbc_driver::throwFeatureNotImplementedException("ODatabaseMetaData::getUDTs", *this);
1083 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */