1
/* Copyright 2011 Yorba Foundation
3
* This software is licensed under the GNU Lesser General Public License
4
* (version 2.1 or later). See the COPYING file in this distribution.
7
namespace DataImports.FSpot.Db {
10
* The value object for the "photo_tags" table, representing a single database row.
12
public class FSpotPhotoTagRow : Object {
13
public int64 photo_id;
18
* This class represents the F-Spot photo_tags table.
20
public class FSpotPhotoTagsTable : FSpotDatabaseTable<FSpotPhotoTagRow> {
21
public static const string TABLE_NAME = "Photo_Tags";
23
public FSpotPhotoTagsTable(Sqlite.Database db, FSpotDatabaseBehavior db_behavior) {
25
set_behavior(db_behavior.get_photo_tags_behavior());
29
public class FSpotPhotoTagsV0Behavior : FSpotTableBehavior<FSpotPhotoTagRow>, Object {
30
private static FSpotPhotoTagsV0Behavior instance;
32
private FSpotPhotoTagsV0Behavior() {
35
public static FSpotPhotoTagsV0Behavior get_instance() {
37
instance = new FSpotPhotoTagsV0Behavior();
41
public string get_table_name() {
42
return FSpotPhotoTagsTable.TABLE_NAME;
45
public string[] list_columns() {
46
return { "photo_id", "tag_id" };
49
public void build_row(Sqlite.Statement stmt, out FSpotPhotoTagRow row, int offset = 0) {
50
row = new FSpotPhotoTagRow();
51
row.photo_id = stmt.column_int64(offset + 0);
52
row.tag_id = stmt.column_int64(offset + 1);