25 #include <scheduler.h> 38 sprintf(sql,
"INSERT INTO upload (upload_desc,upload_filename,user_fk,upload_mode,upload_origin) " 39 "VALUES('testing upload data', 'testing file', '1', '100', 'testing file')");
43 sprintf(sql,
"SELECT currval('upload_upload_pk_seq') as mykey FROM %s",
"upload");
45 upload_pk = atoi(PQget(db_result, 0,
"mykey"));
49 sprintf(sql,
"INSERT INTO foldercontents (parent_fk,foldercontents_mode,child_id) VALUES ('1',2,'%d')", upload_pk);
54 sprintf(sql,
"INSERT INTO job (job_pk,job_user_fk,job_queued,job_priority,job_name,job_upload_fk) " 55 "VALUES(%d,'1',now(),'0','testing file',%d)", job_pk,upload_pk);
59 sprintf(sql,
"INSERT INTO jobqueue " 60 "(jq_pk,jq_job_fk,jq_type,jq_args,jq_runonpfile,jq_starttime,jq_endtime,jq_end_bits,jq_host) " 61 "VALUES (%d,'%d', 'ununpack', '%d', NULL, NULL, NULL, 0, NULL)", jq_pk, job_pk, upload_pk);
int Prepare_Testing_Data(scheduler_t *scheduler)
PGresult * database_exec(scheduler_t *scheduler, const char *sql)
Executes an sql statement for the scheduler.