next up previous contents
Next: JSOC keyword functions Up: JSOC Internal functions Previous: JSOC series functions   Contents

JSOC record functions

/* Retrieve a data record from the database
JSOC_DataRecord_t *jsoc_dr_retrieve(JSOC_Env_t *env, const char *seriesname, 
                                 int id, int version);

/* Commit a modified data record to the database. */
int jsoc_dr_commit(JSOC_Env_t *env, JSOC_DataRecord_t *dr);

/* Retreive a linked datarecord. */
JSOC_DataRecord_t *jsoc_dr_follow_link(JSOC_Env_t *env, JSOC_DataRecord_t *dr, 
                                  const char *linkname);

/* Query to find data records from a series satisfying a given condition. */
JSOC_DataRecord_t *jsoc_dr_query(JSOC_Env_t *env, const char *seriesname, 
                              const char *condition);

/* Assign the datarecord the next unique sequence number from
   the database. The version number is set to 1. */
int jsoc_dr_assign_next_id(JSOC_Env_t *env, JSOC_DataRecord_t *dr);

/* Return a pointer to a copy of the series template whose
   id has been set to the next unique sequence number in the database. */
JSOC_DataRecord_t *jsoc_dr_new(JSOC_Env_t *env, const char *seriesname);

/* Return a pointer to the series template. This template is used for 
   building new data records belonging to this series. */
JSOC_DataRecord_t *jsoc_dr_template(JSOC_Env_t *env, const char *seriesname);

/* Return a pointer to a copy of the series template. cache_index is set
   to the number of the slot in the JSOC datarecord cache used. */
JSOC_DataRecord_t *jsoc_dr_allocate(JSOC_Env_t *env, const char *seriesname, 
                                    int *cache_index);

/* Free a data record structure. */
int jsoc_dr_free(JSOC_Env_t *env, JSOC_DataRecord_t *dr);

/* Deep copy a data record. */
int jsoc_dr_copy(JSOC_Env_t *env, JSOC_DataRecord_t *dst, JSOC_DataRecord_t *src);



Philip Scherrer 2006-06-17