MCPcopy Create free account
hub / github.com/Kitware/VTK / BindDoubleParameter

Method BindDoubleParameter

IO/SQL/vtkSQLiteQuery.cxx:674–699  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

672//------------------------------------------------------------------------------
673
674bool vtkSQLiteQuery::BindDoubleParameter(int index, double value)
675{
676 if (!this->Private->Statement)
677 {
678 vtkErrorMacro(<< "No statement available. Did you forget to call SetQuery?");
679 return false;
680 }
681
682 if (this->Active)
683 {
684 this->Active = false;
685 sqlite3_reset(this->Private->Statement);
686 }
687
688 int status = sqlite3_bind_double(this->Private->Statement, index + 1, value);
689
690 if (status != SQLITE_OK)
691 {
692 std::ostringstream errormessage;
693 errormessage << "sqlite_bind_double returned error: " << status;
694 this->SetLastErrorText(errormessage.str().c_str());
695 vtkErrorMacro(<< this->GetLastErrorText());
696 return false;
697 }
698 return true;
699}
700
701//------------------------------------------------------------------------------
702

Callers 1

BindParameterMethod · 0.95

Calls 3

GetLastErrorTextMethod · 0.95
c_strMethod · 0.45
strMethod · 0.45

Tested by

no test coverage detected