summary refs log tree commit diff stats
path: root/lib/frame.cpp
blob: bc3f842924b790faf97843228964cb4b931f8a3b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include "frame.h"
#include <sqlite3.h>

namespace verbly {
  
  const object frame::objectType = object::frame;
  
  const std::list<std::string> frame::select = {"frame_id", "data"};
  
  const field frame::id = field::integerField(object::frame, "frame_id");
  
  const field frame::group = field::joinThrough(object::frame, "frame_id", object::group, "groups_frames", "group_id");
  
  frame::frame(const database& db, sqlite3_stmt* row) : db_(&db), valid_(true)
  {
    id_ = sqlite3_column_int(row, 0);
    
    // TODO: Initialize frame data from row.
  }
  
};