Groonga
Loading...
Searching...
No Matches
window_function.h
Go to the documentation of this file.
1/*
2 Copyright(C) 2016 Brazil
3 Copyright(C) 2019-2021 Sutou Kouhei <kou@clear-code.com>
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with this library; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18*/
19
20#pragma once
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
30
31typedef struct _grn_window grn_window;
32
34 grn_window *window);
36 grn_window *window);
38 grn_window *window,
39 grn_window_direction direction);
41 grn_window *window);
43 grn_window *window);
45 grn_window *window);
47 grn_window *window);
49 grn_window *window,
50 size_t i);
52 grn_window *window);
54 grn_window *window);
56 grn_window *window);
57
64
66 grn_obj *first_output_column,
67 grn_window *window,
68 grn_obj **first_args,
69 int first_n_args);
70
72 const char *name,
73 int name_size,
75
76/* Deprecated since 9.0.2.
77 Use grn_window_function_executor() instead. */
79 grn_obj *table,
80 grn_obj *output_column,
81 grn_window_definition *definition,
82 grn_obj *window_function_call);
83
84#ifdef __cplusplus
85}
86#endif
grn_rc
Definition groonga.h:61
uint32_t grn_id
Definition groonga.h:44
#define GRN_API
Definition groonga.h:39
Definition groonga.h:351
Definition groonga.h:919
Definition table.h:685
Definition window_function.h:58
grn_table_sort_key * group_keys
Definition window_function.h:61
grn_table_sort_key * sort_keys
Definition window_function.h:59
size_t n_group_keys
Definition window_function.h:62
size_t n_sort_keys
Definition window_function.h:60
GRN_API grn_rc grn_window_rewind(grn_ctx *ctx, grn_window *window)
GRN_API bool grn_window_is_sorted(grn_ctx *ctx, grn_window *window)
GRN_API grn_rc grn_table_apply_window_function(grn_ctx *ctx, grn_obj *table, grn_obj *output_column, grn_window_definition *definition, grn_obj *window_function_call)
GRN_API grn_rc grn_window_set_direction(grn_ctx *ctx, grn_window *window, grn_window_direction direction)
struct _grn_window grn_window
Definition window_function.h:31
GRN_API grn_id grn_window_next(grn_ctx *ctx, grn_window *window)
grn_window_direction
Definition window_function.h:26
@ GRN_WINDOW_DIRECTION_ASCENDING
Definition window_function.h:27
@ GRN_WINDOW_DIRECTION_DESCENDING
Definition window_function.h:28
GRN_API size_t grn_window_get_n_arguments(grn_ctx *ctx, grn_window *window)
struct _grn_window_definition grn_window_definition
GRN_API grn_obj * grn_window_get_argument(grn_ctx *ctx, grn_window *window, size_t i)
GRN_API bool grn_window_is_value_changed(grn_ctx *ctx, grn_window *window)
GRN_API bool grn_window_is_context_table(grn_ctx *ctx, grn_window *window)
GRN_API grn_obj * grn_window_get_output_column(grn_ctx *ctx, grn_window *window)
grn_rc grn_window_function_func(grn_ctx *ctx, grn_obj *first_output_column, grn_window *window, grn_obj **first_args, int first_n_args)
Definition window_function.h:65
GRN_API size_t grn_window_get_size(grn_ctx *ctx, grn_window *window)
GRN_API grn_obj * grn_window_function_create(grn_ctx *ctx, const char *name, int name_size, grn_window_function_func *func)
GRN_API grn_obj * grn_window_get_table(grn_ctx *ctx, grn_window *window)