| 1975 | } |
| 1976 | |
| 1977 | void CreateImageTable() const { |
| 1978 | const std::string sql = StringPrintf( |
| 1979 | "CREATE TABLE IF NOT EXISTS images" |
| 1980 | " (image_id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL," |
| 1981 | " name TEXT NOT NULL UNIQUE," |
| 1982 | " camera_id INTEGER NOT NULL," |
| 1983 | " CONSTRAINT image_id_check CHECK(image_id >= 0 and image_id < %d)," |
| 1984 | " FOREIGN KEY(camera_id) REFERENCES cameras(camera_id));" |
| 1985 | "CREATE UNIQUE INDEX IF NOT EXISTS index_name ON images(name);", |
| 1986 | kMaxNumImages); |
| 1987 | |
| 1988 | SQLITE3_EXEC(database_, sql.c_str(), nullptr); |
| 1989 | } |
| 1990 | |
| 1991 | void CreatePosePriorTable() const { |
| 1992 | const std::string sql = |
nothing calls this directly
no test coverage detected