summaryrefslogtreecommitdiff
path: root/dbaccess/source
diff options
context:
space:
mode:
Diffstat (limited to 'dbaccess/source')
-rw-r--r--dbaccess/source/core/api/CacheSet.cxx205
-rw-r--r--dbaccess/source/core/api/CacheSet.hxx243
-rw-r--r--dbaccess/source/core/api/RowSet.cxx11
-rw-r--r--dbaccess/source/core/api/RowSetCache.cxx11
-rw-r--r--dbaccess/source/core/api/querycomposer.cxx25
-rw-r--r--dbaccess/source/core/api/table.cxx41
6 files changed, 302 insertions, 234 deletions
diff --git a/dbaccess/source/core/api/CacheSet.cxx b/dbaccess/source/core/api/CacheSet.cxx
index 93f2f7549e06..d72b349626c6 100644
--- a/dbaccess/source/core/api/CacheSet.cxx
+++ b/dbaccess/source/core/api/CacheSet.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: CacheSet.cxx,v $
*
- * $Revision: 1.26 $
+ * $Revision: 1.27 $
*
- * last change: $Author: oj $ $Date: 2001-09-20 12:59:25 $
+ * last change: $Author: oj $ $Date: 2001-10-26 07:50:50 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -465,7 +465,7 @@ void SAL_CALL OCacheSet::deleteRow(const ORowSetRow& _rDeleteRow ,const connecti
m_bDeleted = xPrep->executeUpdate() > 0;
}
// -------------------------------------------------------------------------
-void OCacheSet::setParameter(sal_Int32 nPos,Reference< XParameters > _xParameter,const ORowSetValue& _rValue) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
+void OCacheSet::setParameter(sal_Int32 nPos,Reference< XParameters > _xParameter,const ORowSetValue& _rValue) throw(SQLException, RuntimeException)
{
if(!_rValue.isNull())
{
@@ -604,5 +604,204 @@ void OCacheSet::fillValueRow(ORowSetRow& _rRow,sal_Int32 _nPosition)
}
}
// -----------------------------------------------------------------------------
+sal_Bool SAL_CALL OCacheSet::wasNull( ) throw(SQLException, RuntimeException)
+{
+ return m_xDriverRow->wasNull();
+}
+// -------------------------------------------------------------------------
+::rtl::OUString SAL_CALL OCacheSet::getString( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
+{
+ return m_xDriverRow->getString(columnIndex);
+}
+// -------------------------------------------------------------------------
+sal_Bool SAL_CALL OCacheSet::getBoolean( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
+{
+ return m_xDriverRow->getBoolean(columnIndex);
+}
+// -------------------------------------------------------------------------
+sal_Int8 SAL_CALL OCacheSet::getByte( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
+{
+ return m_xDriverRow->getByte(columnIndex);
+}
+// -------------------------------------------------------------------------
+sal_Int16 SAL_CALL OCacheSet::getShort( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
+{
+ return m_xDriverRow->getShort(columnIndex);
+}
+// -------------------------------------------------------------------------
+sal_Int32 SAL_CALL OCacheSet::getInt( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
+{
+ return m_xDriverRow->getInt(columnIndex);
+}
+// -------------------------------------------------------------------------
+sal_Int64 SAL_CALL OCacheSet::getLong( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
+{
+ return m_xDriverRow->getLong(columnIndex);
+}
+// -------------------------------------------------------------------------
+float SAL_CALL OCacheSet::getFloat( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
+{
+ return m_xDriverRow->getFloat(columnIndex);
+}
+// -------------------------------------------------------------------------
+double SAL_CALL OCacheSet::getDouble( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
+{
+ return m_xDriverRow->getDouble(columnIndex);
+}
+// -------------------------------------------------------------------------
+Sequence< sal_Int8 > SAL_CALL OCacheSet::getBytes( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
+{
+ return m_xDriverRow->getBytes(columnIndex);
+}
+// -------------------------------------------------------------------------
+::com::sun::star::util::Date SAL_CALL OCacheSet::getDate( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
+{
+ return m_xDriverRow->getDate(columnIndex);
+}
+// -------------------------------------------------------------------------
+::com::sun::star::util::Time SAL_CALL OCacheSet::getTime( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
+{
+ return m_xDriverRow->getTime(columnIndex);
+}
+// -------------------------------------------------------------------------
+::com::sun::star::util::DateTime SAL_CALL OCacheSet::getTimestamp( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
+{
+ return m_xDriverRow->getTimestamp(columnIndex);
+}
+// -------------------------------------------------------------------------
+Reference< ::com::sun::star::io::XInputStream > SAL_CALL OCacheSet::getBinaryStream( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
+{
+ return m_xDriverRow->getBinaryStream(columnIndex);
+}
+// -------------------------------------------------------------------------
+Reference< ::com::sun::star::io::XInputStream > SAL_CALL OCacheSet::getCharacterStream( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
+{
+ return m_xDriverRow->getCharacterStream(columnIndex);
+}
+// -------------------------------------------------------------------------
+Any SAL_CALL OCacheSet::getObject( sal_Int32 columnIndex, const Reference< ::com::sun::star::container::XNameAccess >& typeMap ) throw(SQLException, RuntimeException)
+{
+ return m_xDriverRow->getObject(columnIndex,typeMap);
+}
+// -------------------------------------------------------------------------
+Reference< XRef > SAL_CALL OCacheSet::getRef( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
+{
+ return m_xDriverRow->getRef(columnIndex);
+}
+// -------------------------------------------------------------------------
+Reference< XBlob > SAL_CALL OCacheSet::getBlob( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
+{
+ return m_xDriverRow->getBlob(columnIndex);
+}
+// -------------------------------------------------------------------------
+Reference< XClob > SAL_CALL OCacheSet::getClob( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
+{
+ return m_xDriverRow->getClob(columnIndex);
+}
+// -------------------------------------------------------------------------
+Reference< XArray > SAL_CALL OCacheSet::getArray( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
+{
+ return m_xDriverRow->getArray(columnIndex);
+}
+// -------------------------------------------------------------------------
+// XResultSet
+sal_Bool SAL_CALL OCacheSet::next( ) throw(SQLException, RuntimeException)
+{
+ m_bInserted = m_bUpdated = m_bDeleted = sal_False;
+ return m_xDriverSet->next();
+}
+// -------------------------------------------------------------------------
+sal_Bool SAL_CALL OCacheSet::isBeforeFirst( ) throw(SQLException, RuntimeException)
+{
+ return m_xDriverSet->isBeforeFirst();
+}
+// -------------------------------------------------------------------------
+sal_Bool SAL_CALL OCacheSet::isAfterLast( ) throw(SQLException, RuntimeException)
+{
+ return m_xDriverSet->isAfterLast();
+}
+// -------------------------------------------------------------------------
+sal_Bool SAL_CALL OCacheSet::isFirst( ) throw(SQLException, RuntimeException)
+{
+ return m_xDriverSet->isFirst();
+}
+// -------------------------------------------------------------------------
+sal_Bool SAL_CALL OCacheSet::isLast( ) throw(SQLException, RuntimeException)
+{
+ return m_xDriverSet->isLast();
+}
+// -------------------------------------------------------------------------
+void SAL_CALL OCacheSet::beforeFirst( ) throw(SQLException, RuntimeException)
+{
+ m_bInserted = m_bUpdated = m_bDeleted = sal_False;
+ m_xDriverSet->beforeFirst();
+}
+// -------------------------------------------------------------------------
+void SAL_CALL OCacheSet::afterLast( ) throw(SQLException, RuntimeException)
+{
+ m_bInserted = m_bUpdated = m_bDeleted = sal_False;
+ m_xDriverSet->afterLast();
+}
+// -------------------------------------------------------------------------
+sal_Bool SAL_CALL OCacheSet::first( ) throw(SQLException, RuntimeException)
+{
+ m_bInserted = m_bUpdated = m_bDeleted = sal_False;
+ return m_xDriverSet->first();
+}
+// -------------------------------------------------------------------------
+sal_Bool SAL_CALL OCacheSet::last( ) throw(SQLException, RuntimeException)
+{
+ m_bInserted = m_bUpdated = m_bDeleted = sal_False;
+ return m_xDriverSet->last();
+}
+// -------------------------------------------------------------------------
+sal_Int32 SAL_CALL OCacheSet::getRow( ) throw(SQLException, RuntimeException)
+{
+ return m_xDriverSet->getRow();
+}
+// -------------------------------------------------------------------------
+sal_Bool SAL_CALL OCacheSet::absolute( sal_Int32 row ) throw(SQLException, RuntimeException)
+{
+ m_bInserted = m_bUpdated = m_bDeleted = sal_False;
+ return m_xDriverSet->absolute(row);
+}
+// -------------------------------------------------------------------------
+sal_Bool SAL_CALL OCacheSet::relative( sal_Int32 rows ) throw(SQLException, RuntimeException)
+{
+ m_bInserted = m_bUpdated = m_bDeleted = sal_False;
+ return m_xDriverSet->relative(rows);
+}
+// -------------------------------------------------------------------------
+sal_Bool SAL_CALL OCacheSet::previous( ) throw(SQLException, RuntimeException)
+{
+ m_bInserted = m_bUpdated = m_bDeleted = sal_False;
+ return m_xDriverSet->previous();
+}
+// -------------------------------------------------------------------------
+void SAL_CALL OCacheSet::refreshRow( ) throw(SQLException, RuntimeException)
+{
+ m_xDriverSet->refreshRow();
+}
+// -------------------------------------------------------------------------
+sal_Bool SAL_CALL OCacheSet::rowUpdated( ) throw(SQLException, RuntimeException)
+{
+ return m_xDriverSet->rowUpdated();
+}
+// -------------------------------------------------------------------------
+sal_Bool SAL_CALL OCacheSet::rowInserted( ) throw(SQLException, RuntimeException)
+{
+ return m_xDriverSet->rowInserted();
+}
+// -------------------------------------------------------------------------
+sal_Bool SAL_CALL OCacheSet::rowDeleted( ) throw(SQLException, RuntimeException)
+{
+ return m_xDriverSet->rowDeleted();
+}
+// -------------------------------------------------------------------------
+Reference< XInterface > SAL_CALL OCacheSet::getStatement( ) throw(SQLException, RuntimeException)
+{
+ return m_xDriverSet->getStatement();
+}
+// -----------------------------------------------------------------------------
diff --git a/dbaccess/source/core/api/CacheSet.hxx b/dbaccess/source/core/api/CacheSet.hxx
index 3141cdad0405..2f3703fd5fef 100644
--- a/dbaccess/source/core/api/CacheSet.hxx
+++ b/dbaccess/source/core/api/CacheSet.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: CacheSet.hxx,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: oj $ $Date: 2001-07-24 13:25:25 $
+ * last change: $Author: oj $ $Date: 2001-10-26 07:50:50 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -139,205 +139,45 @@ namespace dbaccess
virtual void fillValueRow(ORowSetRow& _rRow,sal_Int32 _nPosition);
// ::com::sun::star::sdbc::XRow
- virtual sal_Bool SAL_CALL wasNull( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
- {
- return m_xDriverRow->wasNull();
- }
- // -------------------------------------------------------------------------
- virtual ::rtl::OUString SAL_CALL getString( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
- {
- return m_xDriverRow->getString(columnIndex);
- }
- // -------------------------------------------------------------------------
- virtual sal_Bool SAL_CALL getBoolean( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
- {
- return m_xDriverRow->getBoolean(columnIndex);
- }
- // -------------------------------------------------------------------------
- virtual sal_Int8 SAL_CALL getByte( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
- {
- return m_xDriverRow->getByte(columnIndex);
- }
- // -------------------------------------------------------------------------
- virtual sal_Int16 SAL_CALL getShort( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
- {
- return m_xDriverRow->getShort(columnIndex);
- }
- // -------------------------------------------------------------------------
- virtual sal_Int32 SAL_CALL getInt( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
- {
- return m_xDriverRow->getInt(columnIndex);
- }
- // -------------------------------------------------------------------------
- virtual sal_Int64 SAL_CALL getLong( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
- {
- return m_xDriverRow->getLong(columnIndex);
- }
- // -------------------------------------------------------------------------
- virtual float SAL_CALL getFloat( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
- {
- return m_xDriverRow->getFloat(columnIndex);
- }
- // -------------------------------------------------------------------------
- virtual double SAL_CALL getDouble( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
- {
- return m_xDriverRow->getDouble(columnIndex);
- }
- // -------------------------------------------------------------------------
- virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getBytes( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
- {
- return m_xDriverRow->getBytes(columnIndex);
- }
- // -------------------------------------------------------------------------
- virtual ::com::sun::star::util::Date SAL_CALL getDate( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
- {
- return m_xDriverRow->getDate(columnIndex);
- }
- // -------------------------------------------------------------------------
- virtual ::com::sun::star::util::Time SAL_CALL getTime( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
- {
- return m_xDriverRow->getTime(columnIndex);
- }
- // -------------------------------------------------------------------------
- virtual ::com::sun::star::util::DateTime SAL_CALL getTimestamp( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
- {
- return m_xDriverRow->getTimestamp(columnIndex);
- }
- // -------------------------------------------------------------------------
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > SAL_CALL getBinaryStream( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
- {
- return m_xDriverRow->getBinaryStream(columnIndex);
- }
- // -------------------------------------------------------------------------
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > SAL_CALL getCharacterStream( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
- {
- return m_xDriverRow->getCharacterStream(columnIndex);
- }
- // -------------------------------------------------------------------------
- virtual ::com::sun::star::uno::Any SAL_CALL getObject( sal_Int32 columnIndex, const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& typeMap ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
- {
- return m_xDriverRow->getObject(columnIndex,typeMap);
- }
- // -------------------------------------------------------------------------
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRef > SAL_CALL getRef( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
- {
- return m_xDriverRow->getRef(columnIndex);
- }
- // -------------------------------------------------------------------------
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XBlob > SAL_CALL getBlob( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
- {
- return m_xDriverRow->getBlob(columnIndex);
- }
- // -------------------------------------------------------------------------
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XClob > SAL_CALL getClob( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
- {
- return m_xDriverRow->getClob(columnIndex);
- }
- // -------------------------------------------------------------------------
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XArray > SAL_CALL getArray( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
- {
- return m_xDriverRow->getArray(columnIndex);
- }
- // -------------------------------------------------------------------------
+ virtual sal_Bool SAL_CALL wasNull( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getString( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL getBoolean( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Int8 SAL_CALL getByte( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Int16 SAL_CALL getShort( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getInt( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Int64 SAL_CALL getLong( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual float SAL_CALL getFloat( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual double SAL_CALL getDouble( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getBytes( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::util::Date SAL_CALL getDate( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::util::Time SAL_CALL getTime( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::util::DateTime SAL_CALL getTimestamp( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > SAL_CALL getBinaryStream( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > SAL_CALL getCharacterStream( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getObject( sal_Int32 columnIndex, const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& typeMap ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRef > SAL_CALL getRef( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XBlob > SAL_CALL getBlob( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XClob > SAL_CALL getClob( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XArray > SAL_CALL getArray( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
// ::com::sun::star::sdbc::XResultSet
- virtual sal_Bool SAL_CALL next( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
- {
- m_bInserted = m_bUpdated = m_bDeleted = sal_False;
- return m_xDriverSet->next();
- }
- // -------------------------------------------------------------------------
- virtual sal_Bool SAL_CALL isBeforeFirst( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
- {
- return m_xDriverSet->isBeforeFirst();
- }
- // -------------------------------------------------------------------------
- virtual sal_Bool SAL_CALL isAfterLast( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
- {
- return m_xDriverSet->isAfterLast();
- }
- // -------------------------------------------------------------------------
- virtual sal_Bool SAL_CALL isFirst( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
- {
- return m_xDriverSet->isFirst();
- }
- // -------------------------------------------------------------------------
- virtual sal_Bool SAL_CALL isLast( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
- {
- return m_xDriverSet->isLast();
- }
- // -------------------------------------------------------------------------
- virtual void SAL_CALL beforeFirst( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
- {
- m_bInserted = m_bUpdated = m_bDeleted = sal_False;
- m_xDriverSet->beforeFirst();
- }
- // -------------------------------------------------------------------------
- virtual void SAL_CALL afterLast( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
- {
- m_bInserted = m_bUpdated = m_bDeleted = sal_False;
- m_xDriverSet->afterLast();
- }
- // -------------------------------------------------------------------------
- virtual sal_Bool SAL_CALL first( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
- {
- m_bInserted = m_bUpdated = m_bDeleted = sal_False;
- return m_xDriverSet->first();
- }
- // -------------------------------------------------------------------------
- virtual sal_Bool SAL_CALL last( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
- {
- m_bInserted = m_bUpdated = m_bDeleted = sal_False;
- return m_xDriverSet->last();
- }
- // -------------------------------------------------------------------------
- virtual sal_Int32 SAL_CALL getRow( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
- {
- return m_xDriverSet->getRow();
- }
- // -------------------------------------------------------------------------
- virtual sal_Bool SAL_CALL absolute( sal_Int32 row ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
- {
- m_bInserted = m_bUpdated = m_bDeleted = sal_False;
- return m_xDriverSet->absolute(row);
- }
- // -------------------------------------------------------------------------
- virtual sal_Bool SAL_CALL relative( sal_Int32 rows ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
- {
- m_bInserted = m_bUpdated = m_bDeleted = sal_False;
- return m_xDriverSet->relative(rows);
- }
- // -------------------------------------------------------------------------
- virtual sal_Bool SAL_CALL previous( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
- {
- m_bInserted = m_bUpdated = m_bDeleted = sal_False;
- return m_xDriverSet->previous();
- }
- // -------------------------------------------------------------------------
- virtual void SAL_CALL refreshRow( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
- {
- m_xDriverSet->refreshRow();
- }
- // -------------------------------------------------------------------------
- virtual sal_Bool SAL_CALL rowUpdated( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
- {
- return m_xDriverSet->rowUpdated();
- }
- // -------------------------------------------------------------------------
- virtual sal_Bool SAL_CALL rowInserted( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
- {
- return m_xDriverSet->rowInserted();
- }
- // -------------------------------------------------------------------------
- virtual sal_Bool SAL_CALL rowDeleted( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
- {
- return m_xDriverSet->rowDeleted();
- }
- // -------------------------------------------------------------------------
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getStatement( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
- {
- return m_xDriverSet->getStatement();
- }
- // -------------------------------------------------------------------------
+ virtual sal_Bool SAL_CALL next( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL isBeforeFirst( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL isAfterLast( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL isFirst( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL isLast( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL beforeFirst( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL afterLast( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL first( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL last( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getRow( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL absolute( sal_Int32 row ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL relative( sal_Int32 rows ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL previous( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL refreshRow( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL rowUpdated( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL rowInserted( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL rowDeleted( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getStatement( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
// ::com::sun::star::sdbcx::XRowLocate
virtual ::com::sun::star::uno::Any SAL_CALL getBookmark( const ORowSetRow& _rRow ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) = 0;
virtual sal_Bool SAL_CALL moveToBookmark( const ::com::sun::star::uno::Any& bookmark ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) = 0;
@@ -360,6 +200,9 @@ namespace dbaccess
/*------------------------------------------------------------------------
$Log: not supported by cvs2svn $
+ Revision 1.8 2001/07/24 13:25:25 oj
+ #89430# move ORowSetValue into dbtools
+
Revision 1.7 2001/01/22 07:38:23 oj
#82632# change member
diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx
index f89f7e540f10..85b1e7d0381b 100644
--- a/dbaccess/source/core/api/RowSet.cxx
+++ b/dbaccess/source/core/api/RowSet.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: RowSet.cxx,v $
*
- * $Revision: 1.96 $
+ * $Revision: 1.97 $
*
- * last change: $Author: oj $ $Date: 2001-10-19 12:52:27 $
+ * last change: $Author: oj $ $Date: 2001-10-26 07:50:50 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1598,6 +1598,13 @@ void ORowSet::execute_NoApprove_NoNewConn(ClearableMutexGuard& _rClearForNotific
m_aCurrentRow,
m_pCache->getEnd());
aColumns->push_back(pColumn);
+ if(!sName.getLength())
+ {
+ if(xColumn.is())
+ xColumn->getPropertyValue(PROPERTY_NAME) >>= sName;
+ else
+ sName = ::rtl::OUString::createFromAscii("Expression1");
+ }
pColumn->setName(sName);
aNames.push_back(sName);
m_aDataColumns.push_back(pColumn);
diff --git a/dbaccess/source/core/api/RowSetCache.cxx b/dbaccess/source/core/api/RowSetCache.cxx
index dd4bfbb8eef7..f2ea02eccb34 100644
--- a/dbaccess/source/core/api/RowSetCache.cxx
+++ b/dbaccess/source/core/api/RowSetCache.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: RowSetCache.cxx,v $
*
- * $Revision: 1.47 $
+ * $Revision: 1.48 $
*
- * last change: $Author: hr $ $Date: 2001-10-12 15:34:49 $
+ * last change: $Author: oj $ $Date: 2001-10-26 07:50:50 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -264,8 +264,9 @@ ORowSetCache::ORowSetCache(const Reference< XResultSet >& _xRs,
bAllKeysFound = bAllKeysFound && (nTablesCount == 1 || checkJoin(xConnection,_xComposer,aUpdateTableName));
// || !(comphelper::hasProperty(PROPERTY_CANUPDATEINSERTEDROWS,xProp) && any2bool(xProp->getPropertyValue(PROPERTY_CANUPDATEINSERTEDROWS)))
- if(!bAllKeysFound || (xProp->getPropertySetInfo()->hasPropertyByName(PROPERTY_RESULTSETTYPE) &&
- comphelper::getINT32(xProp->getPropertyValue(PROPERTY_RESULTSETTYPE)) == ResultSetType::FORWARD_ONLY) )
+
+ // oj removed because keyset uses only the next// || (xProp->getPropertySetInfo()->hasPropertyByName(PROPERTY_RESULTSETTYPE) && comphelper::getINT32(xProp->getPropertyValue(PROPERTY_RESULTSETTYPE)) == ResultSetType::FORWARD_ONLY)
+ if(!bAllKeysFound )
{
m_pCacheSet = new OStaticSet(_xRs);
m_nPrivileges = Privilege::SELECT;
@@ -337,7 +338,7 @@ ORowSetCache::ORowSetCache(const Reference< XResultSet >& _xRs,
}
// last check
- if(xProp->getPropertySetInfo()->hasPropertyByName(PROPERTY_RESULTSETCONCURRENCY) &&
+ if(!bAllKeysFound && xProp->getPropertySetInfo()->hasPropertyByName(PROPERTY_RESULTSETCONCURRENCY) &&
::comphelper::getINT32(xProp->getPropertyValue(PROPERTY_RESULTSETCONCURRENCY)) == ResultSetConcurrency::READ_ONLY)
m_nPrivileges = Privilege::SELECT;
}
diff --git a/dbaccess/source/core/api/querycomposer.cxx b/dbaccess/source/core/api/querycomposer.cxx
index 1c199e5d8688..796760624da2 100644
--- a/dbaccess/source/core/api/querycomposer.cxx
+++ b/dbaccess/source/core/api/querycomposer.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: querycomposer.cxx,v $
*
- * $Revision: 1.42 $
+ * $Revision: 1.43 $
*
- * last change: $Author: hr $ $Date: 2001-09-13 10:52:44 $
+ * last change: $Author: oj $ $Date: 2001-10-26 07:50:50 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -150,6 +150,8 @@ using namespace ::utl;
#define STR_SELECT ::rtl::OUString::createFromAscii("SELECT ")
#define STR_FROM ::rtl::OUString::createFromAscii(" FROM ")
#define STR_WHERE ::rtl::OUString::createFromAscii(" WHERE ")
+#define STR_GROUP_BY ::rtl::OUString::createFromAscii(" GROUP BY ")
+#define STR_HAVING ::rtl::OUString::createFromAscii(" HAVING ")
#define STR_ORDER_BY ::rtl::OUString::createFromAscii(" ORDER BY ")
#define STR_AND ::rtl::OUString::createFromAscii(" AND ")
#define STR_LIKE ::rtl::OUString::createFromAscii(" LIKE ")
@@ -431,7 +433,14 @@ void SAL_CALL OQueryComposer::setQuery( const ::rtl::OUString& command ) throw(S
if(xStmt.is())
{
::rtl::OUString sSql = m_aWorkSql;
- sSql += STR_WHERE;
+ ::rtl::OUString sGroupBy = getGroupBy();
+ if(sGroupBy.getLength())
+ {
+ sSql += sGroupBy;
+ sSql += STR_HAVING;
+ }
+ else
+ sSql += STR_WHERE;
sSql += ::rtl::OUString::createFromAscii(" 0 = 1");
Reference<XResultSetMetaDataSupplier> xResMetaDataSup;
@@ -452,7 +461,6 @@ void SAL_CALL OQueryComposer::setQuery( const ::rtl::OUString& command ) throw(S
if(i <= aCols->size())
{
- aNames.push_back(sName);
if(aFind == aCols->end())
{ // here we have to make the assumption that the postion is correct
OSQLColumns::iterator aFind2 = aCols->begin() + i-1;
@@ -460,12 +468,16 @@ void SAL_CALL OQueryComposer::setQuery( const ::rtl::OUString& command ) throw(S
if(xProp.is() && xProp->getPropertySetInfo()->hasPropertyByName(PROPERTY_REALNAME))
{
::connectivity::parse::OParseColumn* pColumn = new ::connectivity::parse::OParseColumn(xProp,m_xMetaData->storesMixedCaseQuotedIdentifiers());
- pColumn->setName(sName);
+ if(sName.getLength())
+ pColumn->setName(sName);
+ else
+ xProp->getPropertyValue(PROPERTY_NAME) >>= sName;
pColumn->setRealName(::comphelper::getString(xProp->getPropertyValue(PROPERTY_REALNAME)));
pColumn->setTableName(::comphelper::getString(xProp->getPropertyValue(PROPERTY_TABLENAME)));
(*aCols)[i-1] = pColumn;
}
}
+ aNames.push_back(sName);
}
}
}
@@ -698,6 +710,7 @@ void SAL_CALL OQueryComposer::appendFilterByColumn( const Reference< XPropertySe
// add the filter and the sort order
aSql2 += getComposedFilter();
+ aSql2 += getGroupBy();
aSql2 += getComposedSort();
resetIterator(aSql2);
@@ -756,6 +769,7 @@ void SAL_CALL OQueryComposer::appendOrderByColumn( const Reference< XPropertySet
// add the filter and the sort order
aSql += getComposedFilter();
+ aSql += getGroupBy();
aSql += getComposedSort();
resetIterator(aSql);
@@ -771,6 +785,7 @@ void SAL_CALL OQueryComposer::setFilter( const ::rtl::OUString& filter ) throw(S
// add the filter and the sort order
aSql += getComposedFilter();
+ aSql += getGroupBy();
aSql += getComposedSort();
resetIterator(aSql);
diff --git a/dbaccess/source/core/api/table.cxx b/dbaccess/source/core/api/table.cxx
index 243ff4d9564c..4ac557567274 100644
--- a/dbaccess/source/core/api/table.cxx
+++ b/dbaccess/source/core/api/table.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: table.cxx,v $
*
- * $Revision: 1.37 $
+ * $Revision: 1.38 $
*
- * last change: $Author: oj $ $Date: 2001-10-18 13:21:39 $
+ * last change: $Author: oj $ $Date: 2001-10-26 07:50:50 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -157,23 +157,26 @@ ODBTable::ODBTable(connectivity::sdbcx::OCollection* _pTables,const OConfigurati
{
DBG_CTOR(ODBTable, NULL);
osl_incrementInterlockedCount( &m_refCount );
-
- DBG_ASSERT(m_xMetaData.is(), "ODBTable::ODBTable : invalid conn !");
- DBG_ASSERT(_rName.getLength(), "ODBTable::ODBTable : name !");
- // register our properties
- construct();
- refreshColumns();
- // refreshKeys();
- // refreshIndexes();
-
- // load the settings from the configuration
- if(m_aConfigurationNode.isValid())
- // our own settings
- loadFrom(m_aConfigurationNode.openNode(CONFIGKEY_SETTINGS));
-
- // we don't collect the privileges here, this is potentially expensive. Instead we determine them on request.
- // (see getFastPropertyValue)
- m_nPrivileges = -1;
+ try
+ {
+ DBG_ASSERT(m_xMetaData.is(), "ODBTable::ODBTable : invalid conn !");
+ DBG_ASSERT(_rName.getLength(), "ODBTable::ODBTable : name !");
+ // register our properties
+ construct();
+ refreshColumns();
+
+ // load the settings from the configuration
+ if(m_aConfigurationNode.isValid())
+ // our own settings
+ loadFrom(m_aConfigurationNode.openNode(CONFIGKEY_SETTINGS));
+
+ // we don't collect the privileges here, this is potentially expensive. Instead we determine them on request.
+ // (see getFastPropertyValue)
+ m_nPrivileges = -1;
+ }
+ catch(Exception&)
+ {
+ }
osl_decrementInterlockedCount( &m_refCount );
// TODO : think about collecting the privileges here, as we can't ensure that in getFastPropertyValue, where