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

Method BindInt64Parameter

IO/SQL/vtkSQLiteQuery.cxx:645–670  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

643//------------------------------------------------------------------------------
644
645bool vtkSQLiteQuery::BindInt64Parameter(int index, vtkTypeInt64 value)
646{
647 if (!this->Private->Statement)
648 {
649 vtkErrorMacro(<< "No statement available. Did you forget to call SetQuery?");
650 return false;
651 }
652
653 if (this->Active)
654 {
655 this->Active = false;
656 sqlite3_reset(this->Private->Statement);
657 }
658 int status =
659 sqlite3_bind_int(this->Private->Statement, index + 1, static_cast<sqlite_int64>(value));
660
661 if (status != SQLITE_OK)
662 {
663 std::ostringstream errormessage;
664 errormessage << "sqlite_bind_int64 returned error: " << status;
665 this->SetLastErrorText(errormessage.str().c_str());
666 vtkErrorMacro(<< this->GetLastErrorText());
667 return false;
668 }
669 return true;
670}
671
672//------------------------------------------------------------------------------
673

Callers 1

BindParameterMethod · 0.95

Calls 3

GetLastErrorTextMethod · 0.95
c_strMethod · 0.45
strMethod · 0.45

Tested by

no test coverage detected