// Now build the actual select list
int sel_pos = 1;
- //jsonObject* is_agg = jsonObjectFindPath(selhash, "//aggregate");
first = 1;
gfirst = 1;
jsonIterator* selclass_itr = jsonNewIterator( selhash );
"Selected class is not defined"
);
jsonIteratorFree( selclass_itr );
- //jsonObjectFree( is_agg );
buffer_free( sql_buf );
buffer_free( select_buf );
buffer_free( order_buf );
"Selected class not in FROM clause in JSON query"
);
jsonIteratorFree( selclass_itr );
- //jsonObjectFree( is_agg );
buffer_free( sql_buf );
buffer_free( select_buf );
buffer_free( order_buf );
);
jsonIteratorFree( select_itr );
jsonIteratorFree( selclass_itr );
- //jsonObjectFree( is_agg );
buffer_free( sql_buf );
buffer_free( select_buf );
buffer_free( order_buf );
);
jsonIteratorFree( select_itr );
jsonIteratorFree( selclass_itr );
- //jsonObjectFree( is_agg );
buffer_free( sql_buf );
buffer_free( select_buf );
buffer_free( order_buf );
);
jsonIteratorFree( select_itr );
jsonIteratorFree( selclass_itr );
- //jsonObjectFree( is_agg );
buffer_free( sql_buf );
buffer_free( select_buf );
buffer_free( order_buf );
);
jsonIteratorFree( select_itr );
jsonIteratorFree( selclass_itr );
- //jsonObjectFree( is_agg );
buffer_free( sql_buf );
buffer_free( select_buf );
buffer_free( order_buf );
);
jsonIteratorFree( select_itr );
jsonIteratorFree( selclass_itr );
- //jsonObjectFree( is_agg );
buffer_free( sql_buf );
buffer_free( select_buf );
buffer_free( order_buf );
);
jsonIteratorFree( select_itr );
jsonIteratorFree( selclass_itr );
- //jsonObjectFree( is_agg );
buffer_free( sql_buf );
buffer_free( select_buf );
buffer_free( order_buf );
}
const jsonObject* agg_obj = jsonObjectGetKey( selfield, "aggregate" );
- if( agg_obj )
+ if( obj_is_true( agg_obj ) )
aggregate_found = 1;
-
- if( ( ! agg_obj ) || ( ! obj_is_true( agg_obj ) ) ) {
+ else {
// Append a comma (except for the first one)
// and add the column to a GROUP BY clause
if (gfirst)
} // end while -- iterating across classes
jsonIteratorFree(selclass_itr);
-
- //if (is_agg) jsonObjectFree(is_agg);
}