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

Method BindIntegerParameter

IO/SQL/vtkSQLiteQuery.cxx:617–641  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

615//------------------------------------------------------------------------------
616
617bool vtkSQLiteQuery::BindIntegerParameter(int index, int value)
618{
619 if (!this->Private->Statement)
620 {
621 vtkErrorMacro(<< "No statement available. Did you forget to call SetQuery?");
622 return false;
623 }
624
625 if (this->Active)
626 {
627 this->Active = false;
628 sqlite3_reset(this->Private->Statement);
629 }
630 int status = sqlite3_bind_int(this->Private->Statement, index + 1, value);
631
632 if (status != SQLITE_OK)
633 {
634 std::ostringstream errormessage;
635 errormessage << "sqlite_bind_int returned error: " << status;
636 this->SetLastErrorText(errormessage.str().c_str());
637 vtkErrorMacro(<< errormessage.str());
638 return false;
639 }
640 return true;
641}
642
643//------------------------------------------------------------------------------
644

Callers 1

BindParameterMethod · 0.95

Calls 2

c_strMethod · 0.45
strMethod · 0.45

Tested by

no test coverage detected