185
187
"INSERT INTO PhotoTable (filename, width, height, filesize, timestamp, exposure_time, "
186
188
+ "orientation, original_orientation, import_id, event_id, md5, thumbnail_md5, "
187
189
+ "exif_md5, time_created, file_format, title, rating, editable_id, developer, "
188
+ "comment, has_gps, gps_lat, gps_lon) "
189
+ "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",
190
+ "comment, has_gps, gps_lat, gps_lon, location_id) "
191
+ "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",
191
193
assert (res == Sqlite.OK);
238
240
assert (res == Sqlite.OK);
239
241
res = stmt.bind_double (23, photo_row.gps_coords.longitude);
240
242
assert (res == Sqlite.OK);
243
res = stmt.bind_int64 (24, photo_row.location_id.id);
244
assert (res == Sqlite.OK);
243
246
res = stmt.step ();
244
247
if (res != Sqlite.DONE) {
380
384
+ "original_orientation, import_id, event_id, transformations, md5, thumbnail_md5, "
381
385
+ "exif_md5, time_created, flags, rating, file_format, title, backlinks, "
382
386
+ "time_reimported, editable_id, metadata_dirty, developer, develop_shotwell_id, "
383
+ "develop_camera_id, develop_embedded_id, comment, enhanced, original_transforms, has_gps, gps_lat, gps_lon "
387
+ "develop_camera_id, develop_embedded_id, comment, enhanced, original_transforms, "
388
+ "has_gps, gps_lat, gps_lon, location_id "
384
389
+ "FROM PhotoTable WHERE id=?",
386
391
assert (res == Sqlite.OK);
436
443
+ "original_orientation, import_id, event_id, transformations, md5, thumbnail_md5, "
437
444
+ "exif_md5, time_created, flags, rating, file_format, title, backlinks, time_reimported, "
438
445
+ "editable_id, metadata_dirty, developer, develop_shotwell_id, develop_camera_id, "
439
+ "develop_embedded_id, comment, enhanced, original_transforms, has_gps, gps_lat, gps_lon FROM PhotoTable",
446
+ "develop_embedded_id, comment, enhanced, original_transforms, has_gps, gps_lat, gps_lon, "
447
+ "location_id FROM PhotoTable",
441
449
assert (res == Sqlite.OK);
498
508
+ "timestamp, exposure_time, orientation, original_orientation, import_id, event_id, "
499
509
+ "transformations, md5, thumbnail_md5, exif_md5, time_created, flags, rating, "
500
510
+ "file_format, title, editable_id, developer, develop_shotwell_id, develop_camera_id, "
501
+ "develop_embedded_id, comment, enhanced, original_transforms, has_gps, gps_lat, gps_lon) "
502
+ "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",
511
+ "develop_embedded_id, comment, enhanced, original_transforms, has_gps, gps_lat, gps_lon, location_id) "
512
+ "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",
504
514
assert (res == Sqlite.OK);
564
574
assert (res == Sqlite.OK);
565
575
res = stmt.bind_double (30, original.gps_coords.longitude);
566
576
assert (res == Sqlite.OK);
577
res = stmt.bind_int64 (31, original.location_id.id);
578
assert (res == Sqlite.OK);
568
580
res = stmt.step ();
569
581
if (res != Sqlite.DONE) {
758
770
return update_int64_by_id (photo_id.id, "event_id", event_id.id);
773
public bool set_location (PhotoID photo_id, LocationID location_id) {
774
return update_int64_by_id (photo_id.id, "location_id", location_id.id);
761
777
private string? get_raw_transformations (PhotoID photo_id) {
762
778
Sqlite.Statement stmt;
763
779
if (!select_by_id (photo_id.id, "transformations", out stmt))