Skip to content
This repository has been archived by the owner on Feb 17, 2024. It is now read-only.

Commit

Permalink
Merge pull request #64 from dium-li3/query-10-optimize
Browse files Browse the repository at this point in the history
Query 10 optimizations
  • Loading branch information
voidbert authored Jan 25, 2024
2 parents 3a5c19d + 82e8218 commit 98ffa4e
Show file tree
Hide file tree
Showing 4 changed files with 358 additions and 256 deletions.
18 changes: 15 additions & 3 deletions trabalho-pratico/include/queries/q10.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,17 @@
/**
* @file q10.h
* @brief A query to generate general metrics data.
*
* ### Examples
*
* ```text
* 10
* 10 2023
* 10 2023 03
* 10F
* 10F 2023
* 10F 2023 03
* ```
*/

#ifndef Q10_H
Expand All @@ -25,9 +36,10 @@
#include "queries/query_type.h"

/**
* @brief Initializes the definition of this query.
* @details This is done automatically in ::query_type_list_init.
* @return A pointer to a `malloc`-allocated ::query_type_t on success, or `NULL` on failure.
* @brief Initializes the definition of queries of type 10.
* @details This is done automatically in [query_type_list](@ref query_type_list.c).
* @return On success, a pointer to a ::query_type_t that must be deleted with ::query_type_free,
* or `NULL` allocation on failure.
*/
query_type_t *q10_create(void);

Expand Down
2 changes: 1 addition & 1 deletion trabalho-pratico/src/batch_mode.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ typedef struct {
/**
* @brief Called for each query, to create the writer to which the query output will be written to.
*
* @param user_data A pointer to a ::batch_mode_iter_data.
* @param user_data A pointer to a ::batch_mode_iter_data_t.
* @param instance Query query instance, whose output should be outputted.
*/
int __batch_mode_init_file_callback(void *user_data, const query_instance_t *instance) {
Expand Down
2 changes: 1 addition & 1 deletion trabalho-pratico/src/database/user_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ typedef struct {
* @brief Intermediate callback for ::user_manager_iter_with_flights.
*
* @param iter_data Real callback and original user data (::user_manager_iter_with_flights_data_t).
* @param user_data A pointer to a ::user_and_data_t.
* @param user_data A pointer to a ::user_manager_user_and_data_t.
*
* @return The value of the original callback called.
*/
Expand Down
Loading

0 comments on commit 98ffa4e

Please sign in to comment.