61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
Stmt q = empty_Stmt;
cson_array * pParents = NULL;
db_prepare( &q,
"SELECT uuid FROM plink, blob"
" WHERE plink.cid=%d AND blob.rid=plink.pid"
" ORDER BY plink.isprim DESC",
rid );
while( SQLITE_ROW==db_step(&q) ){
if(!pParents) {
pParents = cson_new_array();
}
cson_array_append( pParents, cson_sqlite4_column_to_value( q.pStmt, 0 ) );
}
db_finalize(&q);
return cson_array_value(pParents);
|
|
|
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
Stmt q = empty_Stmt;
cson_array * pParents = NULL;
db_prepare( &q,
"SELECT uuid FROM plink, blob"
" WHERE plink.cid=%d AND blob.rid=plink.pid"
" ORDER BY plink.isprim DESC",
rid );
while( SQLITE4_ROW==db_step(&q) ){
if(!pParents) {
pParents = cson_new_array();
}
cson_array_append( pParents, cson_sqlite4_column_to_value( q.pStmt, 0 ) );
}
db_finalize(&q);
return cson_array_value(pParents);
|
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
|
" e.user, "
" e.comment"
" FROM blob b, event e"
" WHERE b.rid=%d"
" AND e.objid=%d",
rid, rid
);
if( db_step(&q)==SQLITE_ROW ){
cson_object * o;
cson_value * tmpV = NULL;
const char *zUuid = db_column_text(&q, 0);
const char *zUser;
const char *zComment;
char * zEUser, * zEComment;
int mtime, omtime;
|
|
|
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
|
" e.user, "
" e.comment"
" FROM blob b, event e"
" WHERE b.rid=%d"
" AND e.objid=%d",
rid, rid
);
if( db_step(&q)==SQLITE4_ROW ){
cson_object * o;
cson_value * tmpV = NULL;
const char *zUuid = db_column_text(&q, 0);
const char *zUser;
const char *zComment;
char * zEUser, * zEComment;
int mtime, omtime;
|
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
|
TAG_BRANCH, rid
);
/* TODO: add a "state" flag for the file in each checkin,
e.g. "modified", "new", "deleted".
*/
checkin_arr = cson_new_array();
cson_object_set(pay, "checkins", cson_array_value(checkin_arr));
while( (SQLITE_ROW==db_step(&q) ) ){
cson_object * row = cson_value_get_object(cson_sqlite4_row_to_object(q.pStmt));
char const isNew = cson_value_get_bool(cson_object_get(row,"isNew"));
char const isDel = cson_value_get_bool(cson_object_get(row,"isDel"));
cson_object_set(row, "isNew", NULL);
cson_object_set(row, "isDel", NULL);
cson_object_set(row, "state",
json_new_string(json_artifact_status_to_string(isNew, isDel)));
|
|
|
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
|
TAG_BRANCH, rid
);
/* TODO: add a "state" flag for the file in each checkin,
e.g. "modified", "new", "deleted".
*/
checkin_arr = cson_new_array();
cson_object_set(pay, "checkins", cson_array_value(checkin_arr));
while( (SQLITE4_ROW==db_step(&q) ) ){
cson_object * row = cson_value_get_object(cson_sqlite4_row_to_object(q.pStmt));
char const isNew = cson_value_get_bool(cson_object_get(row,"isNew"));
char const isDel = cson_value_get_bool(cson_object_get(row,"isDel"));
cson_object_set(row, "isNew", NULL);
cson_object_set(row, "isDel", NULL);
cson_object_set(row, "state",
json_new_string(json_artifact_status_to_string(isNew, isDel)));
|