tfunctionInt.h 1.4 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
/*
 * Copyright (c) 2019 TAOS Data, Inc. <jhtao@taosdata.com>
 *
 * This program is free software: you can use, redistribute, and/or modify
 * it under the terms of the GNU Affero General Public License, version 3
 * or later ("AGPL"), as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */

16 17
#ifndef TDENGINE_TFUNCTIONINT_H
#define TDENGINE_TFUNCTIONINT_H
18 19 20 21 22 23 24 25

#ifdef __cplusplus
extern "C" {
#endif

#include "os.h"

#include "function.h"
H
Hongze Cheng 已提交
26 27
#include "taosdef.h"
#include "tname.h"
28
#include "tudf.h"
H
Hongze Cheng 已提交
29
#include "tvariant.h"
30

H
Haojun Liao 已提交
31
bool topbot_datablock_filter(SqlFunctionCtx *pCtx, const char *minval, const char *maxval);
32 33 34 35 36

/**
 * the numOfRes should be kept, since it may be used later
 * and allow the ResultInfo to be re initialized
 */
37
static FORCE_INLINE void initResultRowEntry(SResultRowEntryInfo *pResInfo, int32_t bufLen) {
38
  pResInfo->initialized = true;  // the this struct has been initialized flag
39

H
Hongze Cheng 已提交
40 41
  pResInfo->complete = false;
  pResInfo->numOfRes = 0;
42 43 44 45 46 47 48
  memset(GET_ROWCELL_INTERBUF(pResInfo), 0, bufLen);
}

#ifdef __cplusplus
}
#endif

49
#endif  // TDENGINE_TFUNCTIONINT_H