summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers
diff options
context:
space:
mode:
authorOcke Janssen <oj@openoffice.org>2000-10-17 08:05:49 +0000
committerOcke Janssen <oj@openoffice.org>2000-10-17 08:05:49 +0000
commit1e7414338e828d9d27cbd228a09c5b7087fefd2d (patch)
treea8f741b8b2dcc16cbbe1a7f55ec23eca5d5e84c0 /connectivity/source/drivers
parent71892b37ac977996d7401c65bb17fb02c13b9da0 (diff)
class renamed
Diffstat (limited to 'connectivity/source/drivers')
-rw-r--r--connectivity/source/drivers/file/FCatalog.cxx7
-rw-r--r--connectivity/source/drivers/file/FDatabaseMetaData.cxx6
-rw-r--r--connectivity/source/drivers/file/FPreparedStatement.cxx8
-rw-r--r--connectivity/source/drivers/file/FResultSet.cxx51
-rw-r--r--connectivity/source/drivers/file/fcode.cxx6
5 files changed, 42 insertions, 36 deletions
diff --git a/connectivity/source/drivers/file/FCatalog.cxx b/connectivity/source/drivers/file/FCatalog.cxx
index 7e7a38415d8d..a72d711d689c 100644
--- a/connectivity/source/drivers/file/FCatalog.cxx
+++ b/connectivity/source/drivers/file/FCatalog.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: FCatalog.cxx,v $
*
- * $Revision: 1.1.1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: hr $ $Date: 2000-09-18 16:14:21 $
+ * last change: $Author: oj $ $Date: 2000-10-17 09:05:49 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -105,8 +105,7 @@ void SAL_CALL OFileCatalog::disposing()
void OFileCatalog::refreshTables()
{
::std::vector< ::rtl::OUString> aVector;
- Sequence< ::rtl::OUString > aTypes(1);
- aTypes[0] = ::rtl::OUString::createFromAscii("%");
+ Sequence< ::rtl::OUString > aTypes;
Reference< XResultSet > xResult = m_xMetaData->getTables(Any(),
::rtl::OUString::createFromAscii("%"),::rtl::OUString::createFromAscii("%"),aTypes);
diff --git a/connectivity/source/drivers/file/FDatabaseMetaData.cxx b/connectivity/source/drivers/file/FDatabaseMetaData.cxx
index 9e8a93791db2..14bcb1c27180 100644
--- a/connectivity/source/drivers/file/FDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/file/FDatabaseMetaData.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: FDatabaseMetaData.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: oj $ $Date: 2000-10-09 12:34:18 $
+ * last change: $Author: oj $ $Date: 2000-10-17 09:05:49 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -226,7 +226,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTables(
const ::rtl::OUString* pEnd = pBegin + nLength;
for(;pBegin != pEnd;++pBegin)
{
- if(*pBegin == aTable || *pBegin == ::rtl::OUString::createFromAscii("%"))
+ if(*pBegin == aTable)
{
bTableFound = sal_True;
break;
diff --git a/connectivity/source/drivers/file/FPreparedStatement.cxx b/connectivity/source/drivers/file/FPreparedStatement.cxx
index 6362a7342643..57dcf3d78dd7 100644
--- a/connectivity/source/drivers/file/FPreparedStatement.cxx
+++ b/connectivity/source/drivers/file/FPreparedStatement.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: FPreparedStatement.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: oj $ $Date: 2000-10-09 12:34:19 $
+ * last change: $Author: oj $ $Date: 2000-10-17 09:05:49 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -396,7 +396,7 @@ void SAL_CALL OPreparedStatement::setNull( sal_Int32 parameterIndex, sal_Int32 s
throw SQLException(STAT_INVALID_INDEX,*this,::rtl::OUString::createFromAscii("07009"),0,Any());
if(parameterIndex >= m_aRow->size())
- m_aRow->push_back(OFileValue());
+ m_aRow->push_back(ORowSetValue());
else
(*m_aRow)[parameterIndex].setNull();
}
@@ -515,7 +515,7 @@ void SAL_CALL OPreparedStatement::setObjectNull( sal_Int32 parameterIndex, sal_I
throw SQLException(STAT_INVALID_INDEX,*this,::rtl::OUString::createFromAscii("07009"),0,Any());
if(parameterIndex >= m_aRow->size())
- m_aRow->push_back(OFileValue());
+ m_aRow->push_back(ORowSetValue());
else
(*m_aRow)[parameterIndex].setNull();
}
diff --git a/connectivity/source/drivers/file/FResultSet.cxx b/connectivity/source/drivers/file/FResultSet.cxx
index 428464e00947..96415aae7f5f 100644
--- a/connectivity/source/drivers/file/FResultSet.cxx
+++ b/connectivity/source/drivers/file/FResultSet.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: FResultSet.cxx,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: fs $ $Date: 2000-10-11 10:47:28 $
+ * last change: $Author: oj $ $Date: 2000-10-17 09:05:49 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -164,9 +164,9 @@ OResultSet::~OResultSet()
void OResultSet::construct()
{
registerProperty(PROPERTY_FETCHSIZE, PROPERTY_ID_FETCHSIZE, 0,&m_nFetchSize, ::getCppuType(reinterpret_cast<sal_Int32*>(NULL)));
- registerProperty(PROPERTY_RESULTSETTYPE, PROPERTY_ID_RESULTSETTYPE, PropertyAttribute::READONLY,&m_nResultSetType, ::getCppuType(reinterpret_cast<sal_Int32*>(NULL)));
+ registerProperty(PROPERTY_RESULTSETTYPE, PROPERTY_ID_RESULTSETTYPE, PropertyAttribute::READONLY,&m_nResultSetType, ::getCppuType(reinterpret_cast<sal_Int32*>(NULL)));
registerProperty(PROPERTY_FETCHDIRECTION, PROPERTY_ID_FETCHDIRECTION, 0,&m_nFetchDirection, ::getCppuType(reinterpret_cast<sal_Int32*>(NULL)));
- registerProperty(PROPERTY_RESULTSETCONCURRENCY, PROPERTY_ID_RESULTSETCONCURRENCY, PropertyAttribute::READONLY,&m_nResultSetConcurrency, ::getCppuType(reinterpret_cast<sal_Int32*>(NULL)));
+ registerProperty(PROPERTY_RESULTSETCONCURRENCY, PROPERTY_ID_RESULTSETCONCURRENCY,PropertyAttribute::READONLY,&m_nResultSetConcurrency, ::getCppuType(reinterpret_cast<sal_Int32*>(NULL)));
}
// -------------------------------------------------------------------------
void OResultSet::disposing(void)
@@ -186,11 +186,16 @@ void OResultSet::disposing(void)
DELETEZ(m_pEvaluationKeySet);
DELETEZ(m_pSortIndex);
- m_aRow->clear();
- m_aEvaluateRow->clear();
- m_aInsertRow->clear();
- m_aAssignValues->clear();
- m_xParamColumns->clear();
+ if(m_aRow.isValid())
+ m_aRow->clear();
+ if(m_aRow.isValid())
+ m_aEvaluateRow->clear();
+ if(m_aRow.isValid())
+ m_aInsertRow->clear();
+ if(m_aRow.isValid())
+ m_aAssignValues->clear();
+ if(m_aRow.isValid())
+ m_xParamColumns->clear();
m_aBookmarkToPos.clear();
}
// -------------------------------------------------------------------------
@@ -272,7 +277,7 @@ sal_Int8 SAL_CALL OResultSet::getByte( sal_Int32 columnIndex ) throw(SQLExceptio
columnIndex = mapColumn(columnIndex);
m_bWasNull = (*m_aRow)[columnIndex].isNull();
- return (*m_aRow)[columnIndex].getInt32();
+ return (*m_aRow)[columnIndex];
}
// -------------------------------------------------------------------------
@@ -283,7 +288,8 @@ Sequence< sal_Int8 > SAL_CALL OResultSet::getBytes( sal_Int32 columnIndex ) thro
throw DisposedException();
columnIndex = mapColumn(columnIndex);
- return Sequence< sal_Int8 >();
+ m_bWasNull = (*m_aRow)[columnIndex].isNull();
+ return (*m_aRow)[columnIndex];
}
// -------------------------------------------------------------------------
@@ -296,7 +302,7 @@ Sequence< sal_Int8 > SAL_CALL OResultSet::getBytes( sal_Int32 columnIndex ) thro
columnIndex = mapColumn(columnIndex);
m_bWasNull = (*m_aRow)[columnIndex].isNull();
- return DateConversion::toDate((*m_aRow)[columnIndex]);
+ return (*m_aRow)[columnIndex];
}
// -------------------------------------------------------------------------
@@ -320,7 +326,7 @@ float SAL_CALL OResultSet::getFloat( sal_Int32 columnIndex ) throw(SQLException,
columnIndex = mapColumn(columnIndex);
m_bWasNull = (*m_aRow)[columnIndex].isNull();
- return (*m_aRow)[columnIndex].getDouble();
+ return (*m_aRow)[columnIndex];
}
// -------------------------------------------------------------------------
@@ -434,7 +440,7 @@ sal_Int16 SAL_CALL OResultSet::getShort( sal_Int32 columnIndex ) throw(SQLExcept
columnIndex = mapColumn(columnIndex);
m_bWasNull = (*m_aRow)[columnIndex].isNull();
- return (*m_aRow)[columnIndex].getInt32();
+ return (*m_aRow)[columnIndex];
}
// -------------------------------------------------------------------------
@@ -460,7 +466,7 @@ sal_Int16 SAL_CALL OResultSet::getShort( sal_Int32 columnIndex ) throw(SQLExcept
throw DisposedException();
columnIndex = mapColumn(columnIndex);
- return DateConversion::toTime((*m_aRow)[columnIndex]);
+ return (*m_aRow)[columnIndex];
}
// -------------------------------------------------------------------------
@@ -472,7 +478,7 @@ sal_Int16 SAL_CALL OResultSet::getShort( sal_Int32 columnIndex ) throw(SQLExcept
throw DisposedException();
columnIndex = mapColumn(columnIndex);
- return DateConversion::toDateTime((*m_aRow)[columnIndex]);
+ return (*m_aRow)[columnIndex];
}
// -------------------------------------------------------------------------
@@ -482,14 +488,14 @@ sal_Bool SAL_CALL OResultSet::isAfterLast( ) throw(SQLException, RuntimeExcepti
if (OResultSet_BASE::rBHelper.bDisposed)
throw DisposedException();
- return sal_False;
+ return m_bEOF;
}
// -------------------------------------------------------------------------
sal_Bool SAL_CALL OResultSet::isFirst( ) throw(SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
if (OResultSet_BASE::rBHelper.bDisposed)
- throw DisposedException();
+ throw DisposedException();
return m_nRowPos == 1;
}
@@ -1518,8 +1524,8 @@ OFILEKeyValue* OResultSet::GetOrderbyKeyValue(OValueRow _rRow)
{
if (nOrderbyColumnNumber[i] == SQL_COLUMN_NOTFOUND) break;
- OFileValue xKey = (*_rRow)[nOrderbyColumnNumber[i]];
- switch (xKey.getType())
+ ORowSetValue xKey = (*_rRow)[nOrderbyColumnNumber[i]];
+ switch (xKey.getTypeKind())
{
case ::com::sun::star::sdbc::DataType::VARCHAR:
case ::com::sun::star::sdbc::DataType::CHAR:
@@ -1820,10 +1826,11 @@ BOOL OResultSet::OpenImpl()
aRowIter->setBound(aCase(connectivity::getString(xProp->getFastPropertyValue(PROPERTY_ID_NAME)),connectivity::getString((*aIter)->getFastPropertyValue(PROPERTY_ID_REALNAME))));
sal_Int32 nType;
xProp->getFastPropertyValue(PROPERTY_ID_TYPE) >>= nType;
- aRowIter->setType(nType);
+ aRowIter->setTypeKind(nType);
}
catch(...)
{
+ OSL_ENSHURE(0,"OResultSet::OpenImpl() Exeception catched!");
}
}
@@ -1911,7 +1918,7 @@ BOOL OResultSet::OpenImpl()
eKeyType[i] = SQL_ORDERBYKEY_NONE;
else
{
- switch (aRowIter->getType())
+ switch (aRowIter->getTypeKind())
{
case DataType::CHAR:
case DataType::VARCHAR:
diff --git a/connectivity/source/drivers/file/fcode.cxx b/connectivity/source/drivers/file/fcode.cxx
index 9869dffe4732..6e785ac5e477 100644
--- a/connectivity/source/drivers/file/fcode.cxx
+++ b/connectivity/source/drivers/file/fcode.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: fcode.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: fs $ $Date: 2000-10-05 08:48:24 $
+ * last change: $Author: oj $ $Date: 2000-10-17 09:05:49 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -139,7 +139,7 @@ void OOperandRow::bindValue(OValueRow _pRow)
Any OOperandRow::getValue() const
{
OSL_ENSHURE(m_pRow.isValid() && m_nRowPos < m_pRow->size(),"Invalid RowPos is >= vector.size()");
- return (*m_pRow)[m_nRowPos];
+ return (*m_pRow)[m_nRowPos].makeAny();
}
//------------------------------------------------------------------
OOperandAttr::OOperandAttr(sal_uInt16 _nPos,const Reference< XFastPropertySet>& _xColumn)