Release request for an sql statement
| 2600 | |
| 2601 | // Release request for an sql statement |
| 2602 | ISC_STATUS API_ROUTINE isc_dsql_free_statement(ISC_STATUS* userStatus, isc_stmt_handle* stmtHandle, |
| 2603 | USHORT option) |
| 2604 | { |
| 2605 | StatusVector status(userStatus); |
| 2606 | CheckStatusWrapper statusWrapper(&status); |
| 2607 | |
| 2608 | try |
| 2609 | { |
| 2610 | RefPtr<IscStatement> statement(translateHandle(statements, stmtHandle)); |
| 2611 | |
| 2612 | if (option & DSQL_drop) |
| 2613 | { |
| 2614 | // Release everything |
| 2615 | statement->closeCursor(&statusWrapper, false); |
| 2616 | statement->closeStatement(&statusWrapper); |
| 2617 | // statement->userHandle is not erased here because this routine can be called |
| 2618 | // against a copy of original variable. |
| 2619 | // This call must release statement and clean handles |
| 2620 | statement->destroy(0); |
| 2621 | *stmtHandle = 0; |
| 2622 | } |
| 2623 | else if (option & DSQL_unprepare) |
| 2624 | { |
| 2625 | // Release everything but the request itself |
| 2626 | statement->closeCursor(&statusWrapper, false); |
| 2627 | statement->closeStatement(&statusWrapper); |
| 2628 | } |
| 2629 | else if (option & DSQL_close) |
| 2630 | { |
| 2631 | // Only close the cursor |
| 2632 | statement->closeCursor(&statusWrapper, true); |
| 2633 | } |
| 2634 | } |
| 2635 | catch (const Exception& e) |
| 2636 | { |
| 2637 | e.stuffException(&statusWrapper); |
| 2638 | } |
| 2639 | |
| 2640 | return status[1]; |
| 2641 | } |
| 2642 | |
| 2643 | |
| 2644 | // Insert a BLOB into a dynamic SQL cursor. (deprecated) |
nothing calls this directly
no test coverage detected