src/cats/sql.c
int db_int_handler(void *ctx, int num_fields, char **row) 
{ 
   uint32_t *val = (uint32_t *)ctx; 
 
   Dmsg1(800, "int_handler starts with row pointing at %x\n", row); 
 
   if (row[0]) { 
      Dmsg1(800, "int_handler finds '%s'\n", row[0]); 
      *val = str_to_int64(row[0]); 
   } else { 
      Dmsg0(800, "int_handler finds zero\n"); 
      *val = 0; 
   } 
   Dmsg0(800, "int_handler finishes\n"); 
   return 0; 
}
/* 
 * Called here to retrieve an integer from the database 
 */
Called here to retrieve an integer from the database
Called here to retrieve an integer from the database
int db_int_handler(void *ctx, int num_fields, char **row) 
{ 
   uint32_t *val = (uint32_t *)ctx; 
   Dmsg1(800, "int_handler starts with row pointing at %x\n", row); 
   if (row[0]) { 
      Dmsg1(800, "int_handler finds '%s'\n", row[0]); 
      *val = str_to_int64(row[0]); 
   } else { 
      Dmsg0(800, "int_handler finds zero\n"); 
      *val = 0; 
   } 
   Dmsg0(800, "int_handler finishes\n"); 
   return 0; 
}
int db_int_handler ( void * ctx , int num_fields , char * * row ) { uint32_t * val = ( uint32_t * ) ctx ; Dmsg1 ( 800 , " \n " , row ) ; if ( row [ 0 ] ) { Dmsg1 ( 800 , " \n " , row [ 0 ] ) ; * val = str_to_int64 ( row [ 0 ] ) ; } else { Dmsg0 ( 800 , " \n " ) ; * val = 0 ; } Dmsg0 ( 800 , " \n " ) ; return 0 ; }
Called here to retrieve an integer from the database
Called here to retrieve an integer from the database