summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorAndrzej J.R. Hunt <andrzej@ahunt.org>2013-07-24 20:09:39 +0200
committerAndrzej J.R. Hunt <andrzej@ahunt.org>2013-07-24 20:36:01 +0200
commit56435965c5ebd28c7e3af7d1a1a7489af938063e (patch)
tree8c060c702b160723906aee5b7b3576c72f873fd3 /connectivity
parent5d7573df1d7551535230e93f439c0fa46c2efca3 (diff)
Tidy up / implement identifier metadata (firebird-sdbc).
Change-Id: Ifcfcd3434b4fa50b9018365b738fcc922e03d9b2
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/registry/firebird/org/openoffice/Office/DataAccess/Drivers.xcu49
-rw-r--r--connectivity/source/drivers/firebird/FDatabaseMetaData.cxx88
2 files changed, 84 insertions, 53 deletions
diff --git a/connectivity/registry/firebird/org/openoffice/Office/DataAccess/Drivers.xcu b/connectivity/registry/firebird/org/openoffice/Office/DataAccess/Drivers.xcu
index 2c3fc4f0d5a0..84ca47c9e18a 100644
--- a/connectivity/registry/firebird/org/openoffice/Office/DataAccess/Drivers.xcu
+++ b/connectivity/registry/firebird/org/openoffice/Office/DataAccess/Drivers.xcu
@@ -55,9 +55,24 @@
<value>false</value>
</prop>
</node>
- </node>
+ <node oor:name="UseCatalog" oor:op="replace">
+ <prop oor:name="Value" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ </node>
+ </node><!--Properties-->
<node oor:name="Features">
- </node>
+ <node oor:name="UseCatalogInSelect" oor:op="replace">
+ <prop oor:name="Value" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ </node>
+ <node oor:name="UseSchemaInSelect" oor:op="replace">
+ <prop oor:name="Value" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ </node>
+ </node><!--Features-->
<node oor:name="MetaData">
</node>
</node>
@@ -83,23 +98,23 @@
<value>false</value>
</prop>
</node>
+ <node oor:name="UseCatalog" oor:op="replace">
+ <prop oor:name="Value" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ </node>
</node>
<node oor:name="Features">
- <!-- These entries enable the "Advanced Settings" UI to change the settings
- whose default is set in node "Properties" above;
- as this is guaranteed not to work with PostgreSQL,
- we don't let people shoot themselves in the foot and don't enable the UI. -->
- <!-- <node oor:name="EscapeDateTime" oor:op="replace"> -->
- <!-- <prop oor:name="Value" oor:type="xs:boolean"> -->
- <!-- <value>false</value> -->
- <!-- </prop> -->
- <!-- </node> -->
- <!-- Confusingly, this corresponds to "EnableOuterJoinEscape" in the Properties -->
- <!-- <node oor:name="UseBracketedOuterJoinSyntax" oor:op="replace"> -->
- <!-- <prop oor:name="Value" oor:type="xs:boolean"> -->
- <!-- <value>false</value> -->
- <!-- </prop> -->
- <!-- </node> -->
+ <node oor:name="UseCatalogInSelect" oor:op="replace">
+ <prop oor:name="Value" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ </node>
+ <node oor:name="UseSchemaInSelect" oor:op="replace">
+ <prop oor:name="Value" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ </node>
</node>
<node oor:name="MetaData">
<node oor:name="Authentication" oor:op="replace">
diff --git a/connectivity/source/drivers/firebird/FDatabaseMetaData.cxx b/connectivity/source/drivers/firebird/FDatabaseMetaData.cxx
index 3545970b78b6..5857fc48a2cd 100644
--- a/connectivity/source/drivers/firebird/FDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/firebird/FDatabaseMetaData.cxx
@@ -87,7 +87,7 @@ OUString SAL_CALL ODatabaseMetaData::getCatalogSeparator() throw(SQLException, R
sal_Int32 SAL_CALL ODatabaseMetaData::getMaxCatalogNameLength() throw(SQLException, RuntimeException)
{
- return 0;
+ return -1;
}
OUString SAL_CALL ODatabaseMetaData::getCatalogTerm() throw(SQLException, RuntimeException)
@@ -148,7 +148,7 @@ sal_Int32 SAL_CALL ODatabaseMetaData::getMaxCharLiteralLength() throw(SQLExcepti
sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnNameLength() throw(SQLException, RuntimeException)
{
- return 32;
+ return 31;
}
sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnsInIndex() throw(SQLException, RuntimeException)
@@ -196,36 +196,68 @@ sal_Bool SAL_CALL ODatabaseMetaData::doesMaxRowSizeIncludeBlobs( ) throw(SQLExc
{
return sal_False;
}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::storesLowerCaseQuotedIdentifiers( ) throw(SQLException, RuntimeException)
+
+// ---- Identifiers -----------------------------------------------------------
+// Only quoted identifiers are case sensitive, unquoted are case insensitive
+OUString SAL_CALL ODatabaseMetaData::getIdentifierQuoteString()
+ throw(SQLException, RuntimeException)
{
- return sal_False;
+ OUString aVal('"');
+ return aVal;
}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::storesLowerCaseIdentifiers( ) throw(SQLException, RuntimeException)
+
+sal_Bool SAL_CALL ODatabaseMetaData::supportsMixedCaseQuotedIdentifiers( ) throw(SQLException, RuntimeException)
+{
+ return sal_True;
+}
+
+sal_Bool SAL_CALL ODatabaseMetaData::storesLowerCaseQuotedIdentifiers()
+ throw(SQLException, RuntimeException)
{
return sal_False;
}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::storesMixedCaseQuotedIdentifiers( ) throw(SQLException, RuntimeException)
+
+sal_Bool SAL_CALL ODatabaseMetaData::storesMixedCaseQuotedIdentifiers()
+ throw(SQLException, RuntimeException)
+{
+ // TODO: confirm this -- the documentation is highly ambiguous
+ // However it seems this should be true as quoted identifiers ARE
+ // stored mixed case.
+ return sal_True;
+}
+
+sal_Bool SAL_CALL ODatabaseMetaData::storesUpperCaseQuotedIdentifiers()
+ throw(SQLException, RuntimeException)
{
return sal_False;
}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::storesMixedCaseIdentifiers( ) throw(SQLException, RuntimeException)
+
+// ---- Unquoted Identifiers -------------------------------------------------
+// All unquoted identifers are stored upper case.
+sal_Bool SAL_CALL ODatabaseMetaData::supportsMixedCaseIdentifiers()
+ throw(SQLException, RuntimeException)
{
return sal_False;
}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::storesUpperCaseQuotedIdentifiers( ) throw(SQLException, RuntimeException)
+
+sal_Bool SAL_CALL ODatabaseMetaData::storesLowerCaseIdentifiers()
+ throw(SQLException, RuntimeException)
{
return sal_False;
}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::storesUpperCaseIdentifiers( ) throw(SQLException, RuntimeException)
+
+sal_Bool SAL_CALL ODatabaseMetaData::storesMixedCaseIdentifiers()
+ throw(SQLException, RuntimeException)
{
return sal_False;
}
+
+sal_Bool SAL_CALL ODatabaseMetaData::storesUpperCaseIdentifiers()
+ throw(SQLException, RuntimeException)
+{
+ return sal_True;
+}
+
// -------------------------------------------------------------------------
sal_Bool SAL_CALL ODatabaseMetaData::supportsAlterTableWithAddColumn( ) throw(SQLException, RuntimeException)
{
@@ -248,13 +280,6 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsNonNullableColumns( ) throw(SQLExc
return sal_True;
}
// -------------------------------------------------------------------------
-OUString SAL_CALL ODatabaseMetaData::getIdentifierQuoteString( ) throw(SQLException, RuntimeException)
-{
- // normally this is "
- OUString aVal("\"");
- return aVal;
-}
-// -------------------------------------------------------------------------
OUString SAL_CALL ODatabaseMetaData::getExtraNameCharacters( ) throw(SQLException, RuntimeException)
{
OUString aVal;
@@ -365,13 +390,13 @@ sal_Int32 SAL_CALL ODatabaseMetaData::getMaxStatements( ) throw(SQLException, R
// -------------------------------------------------------------------------
sal_Int32 SAL_CALL ODatabaseMetaData::getMaxProcedureNameLength( ) throw(SQLException, RuntimeException)
{
- sal_Int32 nValue = 0; // 0 means no limit
+ sal_Int32 nValue = 31; // TODO: confirm
return nValue;
}
// -------------------------------------------------------------------------
sal_Int32 SAL_CALL ODatabaseMetaData::getMaxSchemaNameLength( ) throw(SQLException, RuntimeException)
{
- sal_Int32 nValue = 0; // 0 means no limit
+ sal_Int32 nValue = -1; // 0 means no limit
return nValue;
}
@@ -494,16 +519,6 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsUnionAll( ) throw(SQLException, Ru
return sal_True;
}
// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::supportsMixedCaseIdentifiers( ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::supportsMixedCaseQuotedIdentifiers( ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
sal_Bool SAL_CALL ODatabaseMetaData::nullsAreSortedAtEnd( ) throw(SQLException, RuntimeException)
{
return sal_False;
@@ -841,8 +856,9 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTypeInfo( ) throw(S
pResultSet->setRows(aRows);
return xResultSet;
}
-// -----------------------------------------------------------------------------
-uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getSchemas( ) throw(SQLException, RuntimeException)
+
+uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getSchemas()
+ throw(SQLException, RuntimeException)
{
return NULL;
}