| 761 | //------------------------------------------------------------------------------ |
| 762 | |
| 763 | bool vtkSQLiteQuery::ClearParameterBindings() |
| 764 | { |
| 765 | if (!this->Private->Statement) |
| 766 | { |
| 767 | vtkErrorMacro(<< "No statement available. Did you forget to call SetQuery?"); |
| 768 | return false; |
| 769 | } |
| 770 | |
| 771 | if (this->Active) |
| 772 | { |
| 773 | this->Active = false; |
| 774 | sqlite3_reset(this->Private->Statement); |
| 775 | } |
| 776 | |
| 777 | int status = sqlite3_clear_bindings(this->Private->Statement); |
| 778 | |
| 779 | if (status != SQLITE_OK) |
| 780 | { |
| 781 | std::ostringstream errormessage; |
| 782 | errormessage << "sqlite_clear_bindings returned error: " << status; |
| 783 | this->SetLastErrorText(errormessage.str().c_str()); |
| 784 | vtkErrorMacro(<< this->GetLastErrorText()); |
| 785 | return false; |
| 786 | } |
| 787 | return true; |
| 788 | } |
| 789 | |
| 790 | //------------------------------------------------------------------------------ |
| 791 |
nothing calls this directly
no test coverage detected