src/cats/sqlite.c
static int sqlite_result_handler(void *arh_data, int num_fields, char **rows, char **col_names) 
{  
   struct rh_data *rh_data = (struct rh_data *)arh_data; 
 
   /* The db_sql_query doesn't have access to m_results, so if we wan't to get 
    * fields information, we need to use col_names 
    */ 
   if (!rh_data->initialized) { 
      rh_data->mdb->set_column_names(col_names, num_fields); 
      rh_data->initialized = true; 
   } 
   if (rh_data->result_handler) { 
      (*(rh_data->result_handler))(rh_data->ctx, num_fields, rows); 
   } 
 
   return 0; 
}
/* 
 * Convert SQLite's callback into Bacula DB callback 
 */
Convert SQLite's callback into Bacula DB callback
Convert SQLite ' s callback into Bacula DB callback
static int sqlite_result_handler(void *arh_data, int num_fields, char **rows, char **col_names) 
{  
   struct rh_data *rh_data = (struct rh_data *)arh_data; 
   if (!rh_data->initialized) { 
      rh_data->mdb->set_column_names(col_names, num_fields); 
      rh_data->initialized = true; 
   } 
   if (rh_data->result_handler) { 
      (*(rh_data->result_handler))(rh_data->ctx, num_fields, rows); 
   } 
   return 0; 
}
static int sqlite_result_handler ( void * arh_data , int num_fields , char * * rows , char * * col_names ) { struct rh_data * rh_data = ( struct rh_data * ) arh_data ; if ( ! rh_data -> initialized ) { rh_data -> mdb -> set_column_names ( col_names , num_fields ) ; rh_data -> initialized = true ; } if ( rh_data -> result_handler ) { ( * ( rh_data -> result_handler ) ) ( rh_data -> ctx , num_fields , rows ) ; } return 0 ; }
Convert SQLite's callback into Bacula DB callback
Convert SQLite ' s callback into Bacula DB callback
/* The db_sql_query doesn't have access to m_results, so if we wan't to get 
    * fields information, we need to use col_names 
    */