src/cats/sql_delete.c
static int delete_handler(void *ctx, int num_fields, char **row)
{
   struct s_del_ctx *del = (struct s_del_ctx *)ctx;

   if (del->num_ids == MAX_DEL_LIST_LEN) {
      return 1;
   }
   if (del->num_ids == del->max_ids) {
      del->max_ids = (del->max_ids * 3) / 2;
      del->JobId = (JobId_t *)brealloc(del->JobId, sizeof(JobId_t) *
         del->max_ids);
   }
   del->JobId[del->num_ids++] = (JobId_t)str_to_int64(row[0]);
   return 0;
}
/*
 * Called here to make in memory list of JobIds to be
 *  deleted. The in memory list will then be transversed
 *  to issue the SQL DELETE commands.  Note, the list
 *  is allowed to get to MAX_DEL_LIST_LEN to limit the
 *  maximum malloc'ed memory.
 */
Called here to make in memory list of JobIds to be
deleted. The in memory list will then be transversed
to issue the SQL DELETE commands.  Note, the list
is allowed to get to MAX_DEL_LIST_LEN to limit the
maximum malloc'ed memory.
Called here to make in memory list of JobIds to be deleted . The in memory list will then be transversed to issue the SQL DELETE commands . Note the list is allowed to get to MAX_DEL_LIST_LEN to limit the maximum malloc ' ed memory .
static int delete_handler(void *ctx, int num_fields, char **row)
{
   struct s_del_ctx *del = (struct s_del_ctx *)ctx;
   if (del->num_ids == MAX_DEL_LIST_LEN) {
      return 1;
   }
   if (del->num_ids == del->max_ids) {
      del->max_ids = (del->max_ids * 3) / 2;
      del->JobId = (JobId_t *)brealloc(del->JobId, sizeof(JobId_t) *
         del->max_ids);
   }
   del->JobId[del->num_ids++] = (JobId_t)str_to_int64(row[0]);
   return 0;
}
static int delete_handler ( void * ctx , int num_fields , char * * row ) { struct s_del_ctx * del = ( struct s_del_ctx * ) ctx ; if ( del -> num_ids == MAX_DEL_LIST_LEN ) { return 1 ; } if ( del -> num_ids == del -> max_ids ) { del -> max_ids = ( del -> max_ids * 3 ) / 2 ; del -> JobId = ( JobId_t * ) brealloc ( del -> JobId , sizeof ( JobId_t ) * del -> max_ids ) ; } del -> JobId [ del -> num_ids ++ ] = ( JobId_t ) str_to_int64 ( row [ 0 ] ) ; return 0 ; }
Called here to make in memory list of JobIds to be
  deleted.
Called here to make in memory list of JobIds to be deleted .