1/* -*- c-basic-offset: 2 -*- */
2/*
3 Copyright(C) 2015-2016 Brazil
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 version 2.1 as published by the Free Software Foundation.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with this library; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17*/
18
19#pragma once
20
21#include "grn.h"
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27/*
28 * grn_ts_select() finds records passing through a filter and writes the values
29 * of output columns (the evaluation results of output expressions) into the
30 * output buffer (`ctx->impl->outbuf`).
31 *
32 * Note that the first `offset` records will be discarded and at most `limit`
33 * records will be output.
34 *
35 * On success, grn_ts_select() returns GRN_SUCCESS.
36 * On failure, grn_ts_select() returns an error code and set the details into
37 * `ctx`.
38 */
39grn_rc grn_ts_select(grn_ctx *ctx, grn_obj *table,
40 const char *filter_ptr, size_t filter_len,
41 const char *scorer_ptr, size_t scorer_len,
42 const char *sortby_ptr, size_t sortby_len,
43 const char *output_columns_ptr, size_t output_columns_len,
44 size_t offset, size_t limit);
45
46#ifdef __cplusplus
47}
48#endif
49