| 6128 | |
| 6129 | |
| 6130 | YTransaction* YAttachment::getTransaction(ITransaction* tra) |
| 6131 | { |
| 6132 | if (!tra) |
| 6133 | Arg::Gds(isc_bad_trans_handle).raise(); |
| 6134 | |
| 6135 | // If validation is successfull, this means that this attachment and valid transaction |
| 6136 | // use same provider. I.e. the following cast is safe. |
| 6137 | FbLocalStatus status; |
| 6138 | YTransaction* yt = static_cast<YTransaction*>(tra->validate(&status, this)); |
| 6139 | status.check(); |
| 6140 | if (!yt) |
| 6141 | Arg::Gds(isc_bad_trans_handle).raise(); |
| 6142 | |
| 6143 | yt->selfCheck(); |
| 6144 | return yt; |
| 6145 | } |
| 6146 | |
| 6147 | |
| 6148 | void YAttachment::getNextTransaction(CheckStatusWrapper* status, ITransaction* tra, |