summaryrefslogtreecommitdiff
path: root/connectivity/inc
diff options
context:
space:
mode:
authorFrank Schönheit <frank.schoenheit@sun.com>2009-10-16 14:16:52 +0200
committerFrank Schönheit <frank.schoenheit@sun.com>2009-10-16 14:16:52 +0200
commitbaf36e763f65cba54c8168d10ade4f38a5f62c64 (patch)
treebcb34f1deda4f95a794a4afcd30fa48f20efed16 /connectivity/inc
parentf62c1a55c09050d54387312b4bd2e58bc8d869ad (diff)
#i104329# introduce a dedicated PrimaryKeySupport property at DataSource.Settings, which determines whether a data source should (be assumed to) support primary keys. Valid values are TRUE (=> supports), FALSE (=> doesn't support) and VOID (=> use the old heuristics, i.e. consult XDatabaseMetaData.supportsCoreSQLGrammar)
Diffstat (limited to 'connectivity/inc')
-rw-r--r--connectivity/inc/connectivity/dbmetadata.hxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/connectivity/inc/connectivity/dbmetadata.hxx b/connectivity/inc/connectivity/dbmetadata.hxx
index 32662c5c157a..e1a38c71b5fe 100644
--- a/connectivity/inc/connectivity/dbmetadata.hxx
+++ b/connectivity/inc/connectivity/dbmetadata.hxx
@@ -121,6 +121,17 @@ namespace dbtools
*/
bool supportsSubqueriesInFrom() const;
+ /** checks whether the database supports primary keys
+
+ Since there's no dedicated API to ask a database for this, a heuristics needs to be applied.
+ First, the <code>PrimaryKeySupport<code> settings of the data source is examined. If it is <TRUE/>
+ or <FALSE/>, then value is returned. If it is <NULL/>, then the database meta data are examined
+ for support of core SQL grammar, and the result is returned. The assumption is that a database/driver
+ which supports core SQL grammar usually also supports primary keys, and vice versa. At least, experience
+ shows this is true most of the time.
+ */
+ bool supportsPrimaryKeys() const;
+
/** determines whether names in the database should be restricted to SQL-92 identifiers
Effectively, this method checks the EnableSQL92Check property of the data source settings,