void PartTable::repo(long projectid, long partno, long repoid) { std::string query( "update part set repoid = ? " "where project = ? and partno = ?"); StatementPtr stmt = database()->statement(query); FieldValueFactory factory; stmt->bind(0, factory.get((int)repoid)); stmt->bind(1, factory.get((int)projectid)); stmt->bind(2, factory.get((int)partno)); stmt->execute(); }
void UpdateSpec::bind(StatementPtr& stmt) const { int index = 0; UpdateSpec::const_iterator i; for (i = begin(); i != end(); i++, index++) { stmt->bind(index, i->second); } }
void UpdateSpec::bindid(StatementPtr& stmt, int id) const { //debug(LOG_DEBUG, DEBUG_LOG, 0, "binding id: %d", id); stmt->bind(size(), id); }