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
34d60277
Kaydet (Commit)
34d60277
authored
Tem 12, 2013
tarafından
Andrzej J.R. Hunt
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Implement readonly support in firebird-sdbc.
Change-Id: Ifdb235a3772b92b7064d059700084f75d468d146
üst
66a716a5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
12 deletions
+14
-12
FConnection.cxx
connectivity/source/drivers/firebird/FConnection.cxx
+13
-12
FConnection.hxx
connectivity/source/drivers/firebird/FConnection.hxx
+1
-0
No files found.
connectivity/source/drivers/firebird/FConnection.cxx
Dosyayı görüntüle @
34d60277
...
@@ -93,6 +93,7 @@ OConnection::OConnection(FirebirdDriver* _pDriver)
...
@@ -93,6 +93,7 @@ OConnection::OConnection(FirebirdDriver* _pDriver)
m_bUseCatalog
(
sal_False
),
m_bUseCatalog
(
sal_False
),
m_bUseOldDateFormat
(
sal_False
),
m_bUseOldDateFormat
(
sal_False
),
m_bAutoCommit
(
sal_True
),
m_bAutoCommit
(
sal_True
),
m_bReadOnly
(
sal_False
),
m_DBHandler
(
0
),
m_DBHandler
(
0
),
m_transactionHandle
(
0
)
m_transactionHandle
(
0
)
{
{
...
@@ -383,11 +384,10 @@ void OConnection::setupTransaction()
...
@@ -383,11 +384,10 @@ void OConnection::setupTransaction()
static
char
isc_tpb
[]
=
{
static
char
isc_tpb
[]
=
{
isc_tpb_version3
,
isc_tpb_version3
,
(
m_bAutoCommit
?
isc_tpb_autocommit
:
0
),
(
char
)
(
m_bAutoCommit
?
isc_tpb_autocommit
:
0
),
isc_tpb_write
,
(
char
)
(
!
m_bReadOnly
?
isc_tpb_write
:
isc_tpb_read
),
isc_tpb_read_committed
,
isc_tpb_read_committed
,
// TODO: set isolation level here
isc_tpb_wait
,
isc_tpb_wait
isc_tpb_no_rec_version
};
};
isc_start_transaction
(
status_vector
,
&
m_transactionHandle
,
1
,
&
m_DBHandler
,
isc_start_transaction
(
status_vector
,
&
m_transactionHandle
,
1
,
&
m_DBHandler
,
...
@@ -449,22 +449,23 @@ Reference< XDatabaseMetaData > SAL_CALL OConnection::getMetaData( ) throw(SQLEx
...
@@ -449,22 +449,23 @@ Reference< XDatabaseMetaData > SAL_CALL OConnection::getMetaData( ) throw(SQLEx
return
xMetaData
;
return
xMetaData
;
}
}
// --------------------------------------------------------------------------------
void
SAL_CALL
OConnection
::
setReadOnly
(
sal_Bool
readOnly
)
throw
(
SQLException
,
RuntimeException
)
void
SAL_CALL
OConnection
::
setReadOnly
(
sal_Bool
readOnly
)
throw
(
SQLException
,
RuntimeException
)
{
{
::
osl
::
MutexGuard
aGuard
(
m_aMutex
);
::
osl
::
MutexGuard
aGuard
(
m_aMutex
);
checkDisposed
(
OConnection_BASE
::
rBHelper
.
bDisposed
);
checkDisposed
(
OConnection_BASE
::
rBHelper
.
bDisposed
);
// set you connection to readonly
m_bReadOnly
=
readOnly
;
setupTransaction
();
}
}
// --------------------------------------------------------------------------------
sal_Bool
SAL_CALL
OConnection
::
isReadOnly
(
)
throw
(
SQLException
,
RuntimeException
)
sal_Bool
SAL_CALL
OConnection
::
isReadOnly
()
throw
(
SQLException
,
RuntimeException
)
{
{
::
osl
::
MutexGuard
aGuard
(
m_aMutex
);
::
osl
::
MutexGuard
aGuard
(
m_aMutex
);
checkDisposed
(
OConnection_BASE
::
rBHelper
.
bDisposed
);
checkDisposed
(
OConnection_BASE
::
rBHelper
.
bDisposed
);
// return if your connection to readonly
return
m_bReadOnly
;
return
sal_False
;
}
}
// --------------------------------------------------------------------------------
// --------------------------------------------------------------------------------
void
SAL_CALL
OConnection
::
setCatalog
(
const
::
rtl
::
OUString
&
catalog
)
throw
(
SQLException
,
RuntimeException
)
void
SAL_CALL
OConnection
::
setCatalog
(
const
::
rtl
::
OUString
&
catalog
)
throw
(
SQLException
,
RuntimeException
)
...
...
connectivity/source/drivers/firebird/FConnection.hxx
Dosyayı görüntüle @
34d60277
...
@@ -109,6 +109,7 @@ namespace connectivity
...
@@ -109,6 +109,7 @@ namespace connectivity
sal_Bool
m_bUseCatalog
;
// should we use the catalog on filebased databases
sal_Bool
m_bUseCatalog
;
// should we use the catalog on filebased databases
sal_Bool
m_bUseOldDateFormat
;
sal_Bool
m_bUseOldDateFormat
;
sal_Bool
m_bAutoCommit
;
sal_Bool
m_bAutoCommit
;
sal_Bool
m_bReadOnly
;
isc_db_handle
m_DBHandler
;
isc_db_handle
m_DBHandler
;
isc_tr_handle
m_transactionHandle
;
isc_tr_handle
m_transactionHandle
;
...
...
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