Bugzilla – Attachment 154097 Details for
Bug 120945
FIREBIRD: Relationship of tables isn't recognized by formwizard
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Prepared patch
patch.txt (text/plain), 2.91 KB, created by
Julien Nabet
on 2019-09-11 08:42:39 UTC
(
hide
)
Description:
Prepared patch
Filename:
MIME Type:
Creator:
Julien Nabet
Created:
2019-09-11 08:42:39 UTC
Size:
2.91 KB
patch
obsolete
>diff --git a/connectivity/source/drivers/firebird/DatabaseMetaData.cxx b/connectivity/source/drivers/firebird/DatabaseMetaData.cxx >index 7de45f9021d8..df9c67ec1c46 100644 >--- a/connectivity/source/drivers/firebird/DatabaseMetaData.cxx >+++ b/connectivity/source/drivers/firebird/DatabaseMetaData.cxx >@@ -1460,19 +1460,17 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getVersionColumns( > } > > uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getExportedKeys( >- const Any&, const OUString&, const OUString& ) >+ const Any&, const OUString&, const OUString& table ) > { >- // List the columns in a table which are foreign keys. This is actually >- // never used anywhere in the LO codebase currently. Retrieval from firebird >- // requires using a 5-table join. >- SAL_WARN("connectivity.firebird", "Not yet implemented"); >- OSL_FAIL("Not implemented yet!"); >- // TODO implement >- return new ODatabaseMetaDataResultSet(ODatabaseMetaDataResultSet::eExportedKeys); >+ return ODatabaseMetaData::lcl_getKeys(false, table); > } >- > uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getImportedKeys( > const Any&, const OUString&, const OUString& table ) >+{ >+ return ODatabaseMetaData::lcl_getKeys(true, table); >+} >+ >+uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::lcl_getKeys(const bool& bIsImport, const OUString& table ) > { > ODatabaseMetaDataResultSet* pResultSet = new > ODatabaseMetaDataResultSet(ODatabaseMetaDataResultSet::eImportedKeys); >@@ -1501,8 +1499,11 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getImportedKeys( > "ON PRIM.RDB$INDEX_NAME = PRIMARY_INDEX.RDB$INDEX_NAME " > "INNER JOIN RDB$INDEX_SEGMENTS AS FOREIGN_INDEX " > "ON FOREI.RDB$INDEX_NAME = FOREIGN_INDEX.RDB$INDEX_NAME " >- "WHERE FOREI.RDB$CONSTRAINT_TYPE = 'FOREIGN KEY' " >- "AND FOREI.RDB$RELATION_NAME = '"+ table +"'"; >+ "WHERE FOREI.RDB$CONSTRAINT_TYPE = 'FOREIGN KEY' "; >+ if (bIsImport) >+ sSQL = sSQL + "AND FOREI.RDB$RELATION_NAME = '"+ table +"'"; >+ else >+ sSQL = sSQL + "AND PRIM.RDB$RELATION_NAME = '"+ table +"'"; > > uno::Reference< XResultSet > rs = statement->executeQuery(sSQL); > uno::Reference< XRow > xRow( rs, UNO_QUERY_THROW ); >diff --git a/connectivity/source/drivers/firebird/DatabaseMetaData.hxx b/connectivity/source/drivers/firebird/DatabaseMetaData.hxx >index dc55940fcfe5..95e744bcf7ef 100644 >--- a/connectivity/source/drivers/firebird/DatabaseMetaData.hxx >+++ b/connectivity/source/drivers/firebird/DatabaseMetaData.hxx >@@ -38,6 +38,8 @@ namespace connectivity > class ODatabaseMetaData : public ODatabaseMetaData_BASE > { > ::rtl::Reference<Connection> m_pConnection; >+ private: >+ css::uno::Reference< css::sdbc::XResultSet > lcl_getKeys( const bool& bIsImport, const OUString& table ); > public: > > explicit ODatabaseMetaData(Connection* _pCon);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 120945
:
146047
|
146048
| 154097