Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
ebe37593
Kaydet (Commit)
ebe37593
authored
Agu 07, 2013
tarafından
Andrzej J.R. Hunt
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Clean up ResultSet management. (firebird-sdbc)
Change-Id: I00cd0aa08a5a3da17f06933ebc3422a6b4b8bc74
üst
eb5e9ab4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
26 deletions
+20
-26
PreparedStatement.cxx
connectivity/source/drivers/firebird/PreparedStatement.cxx
+6
-8
Statement.cxx
connectivity/source/drivers/firebird/Statement.cxx
+4
-7
StatementCommonBase.cxx
connectivity/source/drivers/firebird/StatementCommonBase.cxx
+9
-10
StatementCommonBase.hxx
connectivity/source/drivers/firebird/StatementCommonBase.hxx
+1
-1
No files found.
connectivity/source/drivers/firebird/PreparedStatement.cxx
Dosyayı görüntüle @
ebe37593
...
@@ -258,6 +258,7 @@ sal_Bool SAL_CALL OPreparedStatement::execute()
...
@@ -258,6 +258,7 @@ sal_Bool SAL_CALL OPreparedStatement::execute()
MutexGuard
aGuard
(
m_pConnection
->
getMutex
()
);
MutexGuard
aGuard
(
m_pConnection
->
getMutex
()
);
checkDisposed
(
OStatementCommonBase_Base
::
rBHelper
.
bDisposed
);
checkDisposed
(
OStatementCommonBase_Base
::
rBHelper
.
bDisposed
);
ensurePrepared
();
ensurePrepared
();
ISC_STATUS
aErr
;
ISC_STATUS
aErr
;
...
@@ -273,9 +274,12 @@ sal_Bool SAL_CALL OPreparedStatement::execute()
...
@@ -273,9 +274,12 @@ sal_Bool SAL_CALL OPreparedStatement::execute()
evaluateStatusVector
(
m_statusVector
,
"isc_dsql_execute"
,
*
this
);
evaluateStatusVector
(
m_statusVector
,
"isc_dsql_execute"
,
*
this
);
}
}
// TODO: check we actually got results -- ?
m_xResultSet
=
new
OResultSet
(
m_pConnection
,
uno
::
Reference
<
XInterface
>
(
*
this
),
m_statementHandle
,
m_pOutSqlda
);
return
sal_True
;
return
m_xResultSet
.
is
()
;
// TODO: implement handling of multiple ResultSets.
// TODO: implement handling of multiple ResultSets.
}
}
...
@@ -296,12 +300,6 @@ Reference< XResultSet > SAL_CALL OPreparedStatement::executeQuery()
...
@@ -296,12 +300,6 @@ Reference< XResultSet > SAL_CALL OPreparedStatement::executeQuery()
throw
SQLException
();
// TODO: add message to exception
throw
SQLException
();
// TODO: add message to exception
}
}
uno
::
Reference
<
OResultSet
>
pResult
(
new
OResultSet
(
m_pConnection
,
uno
::
Reference
<
XInterface
>
(
*
this
),
m_statementHandle
,
m_pOutSqlda
));
m_xResultSet
=
pResult
.
get
();
return
m_xResultSet
;
return
m_xResultSet
;
}
}
// -------------------------------------------------------------------------
// -------------------------------------------------------------------------
...
...
connectivity/source/drivers/firebird/Statement.cxx
Dosyayı görüntüle @
ebe37593
...
@@ -82,7 +82,6 @@ void SAL_CALL OStatement::release() throw()
...
@@ -82,7 +82,6 @@ void SAL_CALL OStatement::release() throw()
sal_Int32
SAL_CALL
OStatement
::
executeUpdate
(
const
OUString
&
sql
)
sal_Int32
SAL_CALL
OStatement
::
executeUpdate
(
const
OUString
&
sql
)
throw
(
SQLException
,
RuntimeException
)
throw
(
SQLException
,
RuntimeException
)
{
{
// TODO: close ResultSet if existing -- so so in all 3 execute methods.
MutexGuard
aGuard
(
m_pConnection
->
getMutex
());
MutexGuard
aGuard
(
m_pConnection
->
getMutex
());
checkDisposed
(
OStatementCommonBase_Base
::
rBHelper
.
bDisposed
);
checkDisposed
(
OStatementCommonBase_Base
::
rBHelper
.
bDisposed
);
...
@@ -133,12 +132,10 @@ uno::Reference< XResultSet > SAL_CALL OStatement::executeQuery(const OUString& s
...
@@ -133,12 +132,10 @@ uno::Reference< XResultSet > SAL_CALL OStatement::executeQuery(const OUString& s
SAL_WARN
(
"connectivity.firebird"
,
"isc_dsql_execute failed"
);
SAL_WARN
(
"connectivity.firebird"
,
"isc_dsql_execute failed"
);
}
}
uno
::
Reference
<
OResultSet
>
pResult
(
new
OResultSet
(
m_pConnection
,
m_xResultSet
=
new
OResultSet
(
m_pConnection
,
uno
::
Reference
<
XInterface
>
(
*
this
),
uno
::
Reference
<
XInterface
>
(
*
this
),
aStatementHandle
,
aStatementHandle
,
pOutSqlda
));
pOutSqlda
);
//initializeResultSet( pResult.get() );
m_xResultSet
=
pResult
.
get
();
// TODO: deal with cleanup
// TODO: deal with cleanup
// close();
// close();
...
...
connectivity/source/drivers/firebird/StatementCommonBase.cxx
Dosyayı görüntüle @
ebe37593
...
@@ -59,11 +59,10 @@ OStatementCommonBase::~OStatementCommonBase()
...
@@ -59,11 +59,10 @@ OStatementCommonBase::~OStatementCommonBase()
void
OStatementCommonBase
::
disposeResultSet
()
void
OStatementCommonBase
::
disposeResultSet
()
{
{
//free the cursor if alive
uno
::
Reference
<
XComponent
>
xComp
(
m_xResultSet
.
get
(),
UNO_QUERY
);
// uno::Reference< XComponent > xComp(m_xResultSet.get(), UNO_QUERY);
if
(
xComp
.
is
())
// if (xComp.is())
xComp
->
dispose
();
// xComp->dispose();
m_xResultSet
=
uno
::
Reference
<
XResultSet
>
();
// m_xResultSet = uno::Reference< XResultSet>();
}
}
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
...
@@ -101,7 +100,7 @@ void SAL_CALL OStatementCommonBase::close( ) throw(SQLException, RuntimeExcepti
...
@@ -101,7 +100,7 @@ void SAL_CALL OStatementCommonBase::close( ) throw(SQLException, RuntimeExcepti
{
{
MutexGuard
aGuard
(
m_pConnection
->
getMutex
());
MutexGuard
aGuard
(
m_pConnection
->
getMutex
());
checkDisposed
(
OStatementCommonBase_Base
::
rBHelper
.
bDisposed
);
checkDisposed
(
OStatementCommonBase_Base
::
rBHelper
.
bDisposed
);
disposeResultSet
();
}
}
dispose
();
dispose
();
}
}
...
@@ -191,11 +190,11 @@ int OStatementCommonBase::prepareAndDescribeStatement(const OUString& sql,
...
@@ -191,11 +190,11 @@ int OStatementCommonBase::prepareAndDescribeStatement(const OUString& sql,
uno
::
Reference
<
XResultSet
>
SAL_CALL
OStatementCommonBase
::
getResultSet
()
throw
(
SQLException
,
RuntimeException
)
uno
::
Reference
<
XResultSet
>
SAL_CALL
OStatementCommonBase
::
getResultSet
()
throw
(
SQLException
,
RuntimeException
)
{
{
// TODO: verify we really can't support this
// TODO: verify we really can't support this
return
uno
::
Reference
<
XResultSet
>
();
//
return uno::Reference< XResultSet >();
// MutexGuard aGuard( m_aMutex
);
MutexGuard
aGuard
(
m_pConnection
->
getMutex
()
);
//
checkDisposed(OStatementCommonBase_Base::rBHelper.bDisposed);
checkDisposed
(
OStatementCommonBase_Base
::
rBHelper
.
bDisposed
);
//
return m_xResultSet;
return
m_xResultSet
;
}
}
sal_Bool
SAL_CALL
OStatementCommonBase
::
getMoreResults
()
throw
(
SQLException
,
RuntimeException
)
sal_Bool
SAL_CALL
OStatementCommonBase
::
getMoreResults
()
throw
(
SQLException
,
RuntimeException
)
...
...
connectivity/source/drivers/firebird/StatementCommonBase.hxx
Dosyayı görüntüle @
ebe37593
...
@@ -53,7 +53,7 @@ namespace connectivity
...
@@ -53,7 +53,7 @@ namespace connectivity
{
{
protected
:
protected
:
::
com
::
sun
::
star
::
uno
::
Weak
Reference
<
::
com
::
sun
::
star
::
sdbc
::
XResultSet
>
m_xResultSet
;
// The last ResultSet created
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
sdbc
::
XResultSet
>
m_xResultSet
;
// The last ResultSet created
// for this Statement
// for this Statement
::
std
::
list
<
::
rtl
::
OUString
>
m_aBatchList
;
::
std
::
list
<
::
rtl
::
OUString
>
m_aBatchList
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment