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
dc320251
Kaydet (Commit)
dc320251
authored
Tem 22, 2013
tarafından
Andrzej J.R. Hunt
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Remove some unnecessary uses of XSQLDA->sqlvar (firebird-sdbc).
Change-Id: I69ea81a66decb817d5962206e4a6c30537bce02c
üst
28a6e1cf
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
28 deletions
+10
-28
FConnection.cxx
connectivity/source/drivers/firebird/FConnection.cxx
+5
-14
FStatement.cxx
connectivity/source/drivers/firebird/FStatement.cxx
+4
-10
FStatement.hxx
connectivity/source/drivers/firebird/FStatement.hxx
+1
-4
No files found.
connectivity/source/drivers/firebird/FConnection.cxx
Dosyayı görüntüle @
dc320251
...
@@ -325,31 +325,22 @@ Reference< XStatement > SAL_CALL OConnection::createStatement( )
...
@@ -325,31 +325,22 @@ Reference< XStatement > SAL_CALL OConnection::createStatement( )
}
}
Reference
<
XPreparedStatement
>
SAL_CALL
OConnection
::
prepareStatement
(
Reference
<
XPreparedStatement
>
SAL_CALL
OConnection
::
prepareStatement
(
const
::
rtl
::
OUString
&
_sSql
)
throw
(
SQLException
,
RuntimeException
)
const
OUString
&
_sSql
)
throw
(
SQLException
,
RuntimeException
)
{
{
SAL_INFO
(
"connectivity.firebird"
,
"prepareStatement(). "
SAL_INFO
(
"connectivity.firebird"
,
"prepareStatement() "
"Got called with sql: "
<<
_sSql
);
"called with sql: "
<<
_sSql
);
MutexGuard
aGuard
(
m_aMutex
);
MutexGuard
aGuard
(
m_aMutex
);
checkDisposed
(
OConnection_BASE
::
rBHelper
.
bDisposed
);
checkDisposed
(
OConnection_BASE
::
rBHelper
.
bDisposed
);
// the pre
if
(
m_aTypeInfo
.
empty
())
if
(
m_aTypeInfo
.
empty
())
buildTypeInfo
();
buildTypeInfo
();
SAL_INFO
(
"connectivity.firebird"
,
"prepareStatement(). "
"Creating prepared statement."
);
// create a statement
// the statement can only be executed more than once
Reference
<
XPreparedStatement
>
xReturn
=
new
OPreparedStatement
(
this
,
Reference
<
XPreparedStatement
>
xReturn
=
new
OPreparedStatement
(
this
,
m_aTypeInfo
,
m_aTypeInfo
,
_sSql
);
_sSql
);
m_aStatements
.
push_back
(
WeakReferenceHelper
(
xReturn
));
m_aStatements
.
push_back
(
WeakReferenceHelper
(
xReturn
));
SAL_INFO
(
"connectivity.firebird"
,
"prepareStatement(). "
"Prepared Statement created."
);
return
xReturn
;
return
xReturn
;
}
}
...
...
connectivity/source/drivers/firebird/FStatement.cxx
Dosyayı görüntüle @
dc320251
...
@@ -215,8 +215,7 @@ OUString OStatement_Base::sanitizeSqlString(const OUString& sqlIn)
...
@@ -215,8 +215,7 @@ OUString OStatement_Base::sanitizeSqlString(const OUString& sqlIn)
int
OStatement_Base
::
prepareAndDescribeStatement
(
const
OUString
&
sqlIn
,
int
OStatement_Base
::
prepareAndDescribeStatement
(
const
OUString
&
sqlIn
,
isc_stmt_handle
&
aStatementHandle
,
isc_stmt_handle
&
aStatementHandle
,
XSQLDA
*&
pOutSqlda
,
XSQLDA
*&
pOutSqlda
)
XSQLVAR
*&
pVar
)
{
{
MutexGuard
aGuard
(
m_pConnection
->
getMutex
());
MutexGuard
aGuard
(
m_pConnection
->
getMutex
());
...
@@ -281,7 +280,7 @@ int OStatement_Base::prepareAndDescribeStatement(const OUString& sqlIn,
...
@@ -281,7 +280,7 @@ int OStatement_Base::prepareAndDescribeStatement(const OUString& sqlIn,
1
,
1
,
pOutSqlda
);
pOutSqlda
);
}
}
pVar
=
pOutSqlda
->
sqlvar
;
XSQLVAR
*
pVar
=
pOutSqlda
->
sqlvar
;
// Process each XSQLVAR parameter structure in the output XSQLDA
// Process each XSQLVAR parameter structure in the output XSQLDA
if
(
aErr
)
if
(
aErr
)
...
@@ -364,16 +363,13 @@ uno::Reference< XResultSet > SAL_CALL OStatement_Base::executeQuery(const OUStri
...
@@ -364,16 +363,13 @@ uno::Reference< XResultSet > SAL_CALL OStatement_Base::executeQuery(const OUStri
checkDisposed
(
OStatement_BASE
::
rBHelper
.
bDisposed
);
checkDisposed
(
OStatement_BASE
::
rBHelper
.
bDisposed
);
XSQLDA
*
pOutSqlda
=
0
;
XSQLDA
*
pOutSqlda
=
0
;
XSQLVAR
*
pVar
=
0
;
isc_stmt_handle
aStatementHandle
=
0
;
isc_stmt_handle
aStatementHandle
=
0
;
int
aErr
=
0
;
int
aErr
=
0
;
aErr
=
prepareAndDescribeStatement
(
sql
,
aErr
=
prepareAndDescribeStatement
(
sql
,
aStatementHandle
,
aStatementHandle
,
pOutSqlda
,
pOutSqlda
);
pVar
);
if
(
aErr
)
if
(
aErr
)
{
{
SAL_WARN
(
"connectivity.firebird"
,
"prepareAndDescribeStatement failed"
);
SAL_WARN
(
"connectivity.firebird"
,
"prepareAndDescribeStatement failed"
);
...
@@ -411,15 +407,13 @@ sal_Bool SAL_CALL OStatement_Base::execute(const OUString& sql) throw(SQLExcepti
...
@@ -411,15 +407,13 @@ sal_Bool SAL_CALL OStatement_Base::execute(const OUString& sql) throw(SQLExcepti
checkDisposed
(
OStatement_BASE
::
rBHelper
.
bDisposed
);
checkDisposed
(
OStatement_BASE
::
rBHelper
.
bDisposed
);
XSQLDA
*
pOutSqlda
=
0
;
XSQLDA
*
pOutSqlda
=
0
;
XSQLVAR
*
pVar
=
0
;
isc_stmt_handle
aStatementHandle
=
0
;
isc_stmt_handle
aStatementHandle
=
0
;
int
aErr
=
0
;
int
aErr
=
0
;
aErr
=
prepareAndDescribeStatement
(
sql
,
aErr
=
prepareAndDescribeStatement
(
sql
,
aStatementHandle
,
aStatementHandle
,
pOutSqlda
,
pOutSqlda
);
pVar
);
if
(
aErr
)
if
(
aErr
)
{
{
...
...
connectivity/source/drivers/firebird/FStatement.hxx
Dosyayı görüntüle @
dc320251
...
@@ -77,7 +77,6 @@ namespace connectivity
...
@@ -77,7 +77,6 @@ namespace connectivity
OConnection
*
m_pConnection
;
OConnection
*
m_pConnection
;
XSQLDA
*
m_OUTsqlda
;
XSQLDA
*
m_INsqlda
;
XSQLDA
*
m_INsqlda
;
ISC_STATUS_ARRAY
m_statusVector
;
ISC_STATUS_ARRAY
m_statusVector
;
protected
:
protected
:
...
@@ -104,8 +103,7 @@ namespace connectivity
...
@@ -104,8 +103,7 @@ namespace connectivity
virtual
~
OStatement_Base
();
virtual
~
OStatement_Base
();
int
prepareAndDescribeStatement
(
const
OUString
&
sqlIn
,
int
prepareAndDescribeStatement
(
const
OUString
&
sqlIn
,
isc_stmt_handle
&
aStatementHandle
,
isc_stmt_handle
&
aStatementHandle
,
XSQLDA
*&
pOutSqlda
,
XSQLDA
*&
pOutSqlda
);
XSQLVAR
*&
pVar
);
::
rtl
::
OUString
sanitizeSqlString
(
const
OUString
&
sqlIn
);
::
rtl
::
OUString
sanitizeSqlString
(
const
OUString
&
sqlIn
);
public
:
public
:
...
@@ -147,7 +145,6 @@ namespace connectivity
...
@@ -147,7 +145,6 @@ namespace connectivity
// other methods
// other methods
OConnection
*
getOwnConnection
()
const
{
return
m_pConnection
;}
OConnection
*
getOwnConnection
()
const
{
return
m_pConnection
;}
inline
XSQLDA
*
getOUTsqlda
()
const
{
return
m_OUTsqlda
;
}
inline
XSQLDA
*
getINsqlda
()
const
{
return
m_INsqlda
;
}
inline
XSQLDA
*
getINsqlda
()
const
{
return
m_INsqlda
;
}
};
};
...
...
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