| 1754 | } |
| 1755 | |
| 1756 | bool sqliteOperation::updateLaneBoundary(const hadmap::tx_laneboundary_t& boundary) { |
| 1757 | char sql[512]; |
| 1758 | |
| 1759 | sprintf(sql, |
| 1760 | "UPDATE " LANE_BOUNDARY_TABLE |
| 1761 | " SET srs = ?, lane_mark = ?, geom = ? " |
| 1762 | "WHERE pkid = %llu", |
| 1763 | boundary.pkid); |
| 1764 | |
| 1765 | sqliteStmtPtr stmt(dbPtr, sql); |
| 1766 | |
| 1767 | sqlite3_bind_int(stmt, 1, boundary.srs); |
| 1768 | sqlite3_bind_int(stmt, 2, boundary.lane_mark); |
| 1769 | |
| 1770 | sqlite3_blob_data blob; |
| 1771 | createBlob(boundary.geom, boundary.srs, blob); |
| 1772 | sqlite3_bind_blob(stmt, 3, blob.data, blob.size, SQLITE_TRANSIENT); |
| 1773 | |
| 1774 | int r = sqlite3_step(stmt); |
| 1775 | if (SQLITE_DONE != r) std::cerr << "Update Boundary Error, Code " << r << std::endl; |
| 1776 | sqlite3_reset(stmt); |
| 1777 | |
| 1778 | return r == SQLITE_DONE; |
| 1779 | } |
| 1780 | |
| 1781 | bool sqliteOperation::updateLaneLink(const hadmap::tx_lanelink_t& lanelink) { |
| 1782 | char sql[512]; |
no test coverage detected