| 268 | } |
| 269 | |
| 270 | Status SqliteTransaction::Commit() { |
| 271 | int rc = sqlite3_step(db_->commit_); |
| 272 | if (rc != SQLITE_DONE) { |
| 273 | return PrintfStatus(rc, "COMMIT failed: [%d] %s", rc, |
| 274 | sqlite3_errmsg(db_->db_)); |
| 275 | } |
| 276 | sqlite3_reset(db_->commit_); |
| 277 | sqlite3_reset(db_->begin_); |
| 278 | Begin(); |
| 279 | return Status::OK(); |
| 280 | } |
| 281 | |
| 282 | } // namespace tensorflow |