Revision 9158a2b9 src/sql/LogDB.cc

View differences:

src/sql/LogDB.cc
32 32
    "timestamp INTEGER, fed_index INTEGER)";
33 33

  
34 34
/* -------------------------------------------------------------------------- */
35

  
36
int LogDB::bootstrap(SqlDB *_db)
37
{
38
    int rc;
39

  
40
    std::ostringstream oss(db_bootstrap);
41

  
42
    rc = _db->exec_local_wr(oss);
43

  
44
    // Create indexes
45
    oss.str("CREATE INDEX fed_index_idx on logdb (fed_index);");
46

  
47
    rc += _db->exec_local_wr(oss);
48

  
49
    oss.str("CREATE INDEX timestamp_idx on logdb (timestamp);");
50

  
51
    rc += _db->exec_local_wr(oss);
52

  
53
    return rc;
54
};
55

  
56
/* -------------------------------------------------------------------------- */
35 57
/* -------------------------------------------------------------------------- */
36 58

  
37 59
int LogDBRecord::select_cb(void *nil, int num, char **values, char **names)

Also available in: Unified diff