MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / Transaction

Class Transaction

src/remote/client/interface.cpp:242–295  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

240}
241
242class Transaction final : public RefCntIface<ITransactionImpl<Transaction, CheckStatusWrapper> >
243{
244public:
245 // ITransaction implementation
246 int release() override;
247 void getInfo(CheckStatusWrapper* status,
248 unsigned int itemsLength, const unsigned char* items,
249 unsigned int bufferLength, unsigned char* buffer) override;
250 void prepare(CheckStatusWrapper* status,
251 unsigned int msg_length = 0, const unsigned char* message = 0) override;
252 void commit(CheckStatusWrapper* status) override;
253 void commitRetaining(CheckStatusWrapper* status) override;
254 void rollback(CheckStatusWrapper* status) override;
255 void rollbackRetaining(CheckStatusWrapper* status) override;
256 void disconnect(CheckStatusWrapper* status) override;
257 ITransaction* join(CheckStatusWrapper* status, ITransaction* tra) override;
258 Transaction* validate(CheckStatusWrapper* status, IAttachment* attachment) override;
259 Transaction* enterDtc(CheckStatusWrapper* status) override;
260 void deprecatedCommit(CheckStatusWrapper* status) override;
261 void deprecatedRollback(CheckStatusWrapper* status) override;
262 void deprecatedDisconnect(CheckStatusWrapper* status) override;
263
264public:
265 Transaction(Rtr* handle, Attachment* a)
266 : remAtt(a),
267 transaction(handle)
268 {
269 transaction->rtr_self = &transaction;
270 }
271
272 Rtr* getTransaction()
273 {
274 return transaction;
275 }
276
277 void clear()
278 {
279 transaction = NULL;
280 }
281
282private:
283 Transaction(Transaction* from)
284 : remAtt(from->remAtt),
285 transaction(from->transaction)
286 { }
287
288 void freeClientData(CheckStatusWrapper* status, bool force = false);
289 void internalCommit(CheckStatusWrapper* status);
290 void internalRollback(CheckStatusWrapper* status);
291 void internalDisconnect(CheckStatusWrapper* status);
292
293 Attachment* remAtt;
294 Rtr* transaction;
295};
296
297int Transaction::release()
298{

Callers 4

enterDtcMethod · 0.70
executeMethod · 0.70
reconnectTransactionMethod · 0.70
startTransactionMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected