OmniSciDB  a5dc49c757
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ExtensionFunctionsTextTesting.hpp File Reference
#include "heavydbTypes.h"
+ Include dependency graph for ExtensionFunctionsTextTesting.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

EXTENSION_NOINLINE int32_t text_encoding_none_length (const TextEncodingNone &t)
 
EXTENSION_NOINLINE TextEncodingNone text_encoding_none_copy (RowFunctionManager &mgr, const TextEncodingNone &t)
 
EXTENSION_NOINLINE TextEncodingNone text_encoding_none_concat (RowFunctionManager &mgr, const TextEncodingNone &t1, const TextEncodingNone &t2)
 
EXTENSION_NOINLINE TextEncodingDict text_encoding_dict_concat (RowFunctionManager &mgr, const TextEncodingDict t_dict, const TextEncodingNone &t_none)
 
EXTENSION_NOINLINE TextEncodingDict text_encoding_dict_concat2 (RowFunctionManager &mgr, const TextEncodingNone &t_none, const TextEncodingDict t_dict)
 
EXTENSION_NOINLINE TextEncodingDict text_encoding_dict_concat3 (RowFunctionManager &mgr, const TextEncodingDict t1, const TextEncodingDict t2)
 
EXTENSION_NOINLINE TextEncodingDict text_encoding_dict_copy (RowFunctionManager &mgr, const TextEncodingDict t)
 
EXTENSION_NOINLINE TextEncodingDict text_encoding_dict_copy_from (RowFunctionManager &mgr, const TextEncodingDict t1, const TextEncodingDict t2, const int32_t select)
 
EXTENSION_NOINLINE TextEncodingNone udf_identity (RowFunctionManager &mgr, const TextEncodingNone &t)
 

Function Documentation

EXTENSION_NOINLINE TextEncodingDict text_encoding_dict_concat ( RowFunctionManager mgr,
const TextEncodingDict  t_dict,
const TextEncodingNone t_none 
)

Definition at line 45 of file ExtensionFunctionsTextTesting.hpp.

References GET_DICT_DB_ID, GET_DICT_ID, RowFunctionManager::getOrAddTransient(), RowFunctionManager::getString(), TextEncodingNone::getString(), TRANSIENT_DICT_DB_ID, and TRANSIENT_DICT_ID.

47  {
48  std::string str = mgr.getString(GET_DICT_DB_ID(mgr, 0), GET_DICT_ID(mgr, 0), t_dict);
49  return mgr.getOrAddTransient(
51 }
std::string getString() const
Definition: heavydbTypes.h:641
#define TRANSIENT_DICT_DB_ID
Definition: DbObjectKeys.h:25
#define TRANSIENT_DICT_ID
Definition: DbObjectKeys.h:24
#define GET_DICT_ID(mgr, arg_idx)
Definition: heavydbTypes.h:141
#define GET_DICT_DB_ID(mgr, arg_idx)
Definition: heavydbTypes.h:139
int32_t getOrAddTransient(int32_t db_id, int32_t dict_id, std::string str)
Definition: heavydbTypes.h:314
std::string getString(int32_t db_id, int32_t dict_id, int32_t string_id)
Definition: heavydbTypes.h:299

+ Here is the call graph for this function:

EXTENSION_NOINLINE TextEncodingDict text_encoding_dict_concat2 ( RowFunctionManager mgr,
const TextEncodingNone t_none,
const TextEncodingDict  t_dict 
)

Definition at line 54 of file ExtensionFunctionsTextTesting.hpp.

References GET_DICT_DB_ID, GET_DICT_ID, RowFunctionManager::getOrAddTransient(), RowFunctionManager::getString(), TextEncodingNone::getString(), TRANSIENT_DICT_DB_ID, and TRANSIENT_DICT_ID.

56  {
57  std::string str = mgr.getString(GET_DICT_DB_ID(mgr, 1), GET_DICT_ID(mgr, 1), t_dict);
58  return mgr.getOrAddTransient(
60 }
std::string getString() const
Definition: heavydbTypes.h:641
#define TRANSIENT_DICT_DB_ID
Definition: DbObjectKeys.h:25
#define TRANSIENT_DICT_ID
Definition: DbObjectKeys.h:24
#define GET_DICT_ID(mgr, arg_idx)
Definition: heavydbTypes.h:141
#define GET_DICT_DB_ID(mgr, arg_idx)
Definition: heavydbTypes.h:139
int32_t getOrAddTransient(int32_t db_id, int32_t dict_id, std::string str)
Definition: heavydbTypes.h:314
std::string getString(int32_t db_id, int32_t dict_id, int32_t string_id)
Definition: heavydbTypes.h:299

+ Here is the call graph for this function:

EXTENSION_NOINLINE TextEncodingDict text_encoding_dict_concat3 ( RowFunctionManager mgr,
const TextEncodingDict  t1,
const TextEncodingDict  t2 
)

Definition at line 63 of file ExtensionFunctionsTextTesting.hpp.

References GET_DICT_DB_ID, GET_DICT_ID, RowFunctionManager::getOrAddTransient(), RowFunctionManager::getString(), TRANSIENT_DICT_DB_ID, and TRANSIENT_DICT_ID.

65  {
66  std::string s1 = mgr.getString(GET_DICT_DB_ID(mgr, 0), GET_DICT_ID(mgr, 0), t1);
67  std::string s2 = mgr.getString(GET_DICT_DB_ID(mgr, 1), GET_DICT_ID(mgr, 1), t2);
68  return mgr.getOrAddTransient(TRANSIENT_DICT_DB_ID, TRANSIENT_DICT_ID, s1 + ' ' + s2);
69 }
#define TRANSIENT_DICT_DB_ID
Definition: DbObjectKeys.h:25
#define TRANSIENT_DICT_ID
Definition: DbObjectKeys.h:24
#define GET_DICT_ID(mgr, arg_idx)
Definition: heavydbTypes.h:141
#define GET_DICT_DB_ID(mgr, arg_idx)
Definition: heavydbTypes.h:139
int32_t getOrAddTransient(int32_t db_id, int32_t dict_id, std::string str)
Definition: heavydbTypes.h:314
std::string getString(int32_t db_id, int32_t dict_id, int32_t string_id)
Definition: heavydbTypes.h:299

+ Here is the call graph for this function:

EXTENSION_NOINLINE TextEncodingDict text_encoding_dict_copy ( RowFunctionManager mgr,
const TextEncodingDict  t 
)

Definition at line 72 of file ExtensionFunctionsTextTesting.hpp.

References GET_DICT_DB_ID, GET_DICT_ID, RowFunctionManager::getOrAddTransient(), RowFunctionManager::getString(), TRANSIENT_DICT_DB_ID, and TRANSIENT_DICT_ID.

73  {
74  std::string str = mgr.getString(GET_DICT_DB_ID(mgr, 0), GET_DICT_ID(mgr, 0), t);
75  return mgr.getOrAddTransient(TRANSIENT_DICT_DB_ID, TRANSIENT_DICT_ID, "copy: " + str);
76 }
#define TRANSIENT_DICT_DB_ID
Definition: DbObjectKeys.h:25
#define TRANSIENT_DICT_ID
Definition: DbObjectKeys.h:24
#define GET_DICT_ID(mgr, arg_idx)
Definition: heavydbTypes.h:141
#define GET_DICT_DB_ID(mgr, arg_idx)
Definition: heavydbTypes.h:139
int32_t getOrAddTransient(int32_t db_id, int32_t dict_id, std::string str)
Definition: heavydbTypes.h:314
std::string getString(int32_t db_id, int32_t dict_id, int32_t string_id)
Definition: heavydbTypes.h:299

+ Here is the call graph for this function:

EXTENSION_NOINLINE TextEncodingDict text_encoding_dict_copy_from ( RowFunctionManager mgr,
const TextEncodingDict  t1,
const TextEncodingDict  t2,
const int32_t  select 
)

Definition at line 79 of file ExtensionFunctionsTextTesting.hpp.

References GET_DICT_DB_ID, GET_DICT_ID, RowFunctionManager::getOrAddTransient(), RowFunctionManager::getString(), TRANSIENT_DICT_DB_ID, and TRANSIENT_DICT_ID.

82  {
83  std::string str;
84  if (select == 1) {
85  str = mgr.getString(GET_DICT_DB_ID(mgr, 0), GET_DICT_ID(mgr, 0), t1);
86  } else {
87  str = mgr.getString(GET_DICT_DB_ID(mgr, 1), GET_DICT_ID(mgr, 1), t1);
88  }
89  return mgr.getOrAddTransient(TRANSIENT_DICT_DB_ID, TRANSIENT_DICT_ID, "copy: " + str);
90 }
#define TRANSIENT_DICT_DB_ID
Definition: DbObjectKeys.h:25
#define TRANSIENT_DICT_ID
Definition: DbObjectKeys.h:24
#define GET_DICT_ID(mgr, arg_idx)
Definition: heavydbTypes.h:141
#define GET_DICT_DB_ID(mgr, arg_idx)
Definition: heavydbTypes.h:139
int32_t getOrAddTransient(int32_t db_id, int32_t dict_id, std::string str)
Definition: heavydbTypes.h:314
std::string getString(int32_t db_id, int32_t dict_id, int32_t string_id)
Definition: heavydbTypes.h:299

+ Here is the call graph for this function:

EXTENSION_NOINLINE TextEncodingNone text_encoding_none_concat ( RowFunctionManager mgr,
const TextEncodingNone t1,
const TextEncodingNone t2 
)

Definition at line 38 of file ExtensionFunctionsTextTesting.hpp.

References TextEncodingNone::getString().

40  {
41  return TextEncodingNone(mgr, t1.getString() + ' ' + t2.getString());
42 }
std::string getString() const
Definition: heavydbTypes.h:641

+ Here is the call graph for this function:

EXTENSION_NOINLINE TextEncodingNone text_encoding_none_copy ( RowFunctionManager mgr,
const TextEncodingNone t 
)

Definition at line 32 of file ExtensionFunctionsTextTesting.hpp.

References TextEncodingNone::getString().

33  {
34  return TextEncodingNone(mgr, t.getString());
35 }
std::string getString() const
Definition: heavydbTypes.h:641

+ Here is the call graph for this function:

EXTENSION_NOINLINE int32_t text_encoding_none_length ( const TextEncodingNone t)

Definition at line 25 of file ExtensionFunctionsTextTesting.hpp.

References TextEncodingNone::size().

25  {
26  return t.size();
27 }
DEVICE ALWAYS_INLINE int64_t size() const
Definition: heavydbTypes.h:688

+ Here is the call graph for this function:

Definition at line 93 of file ExtensionFunctionsTextTesting.hpp.

References TextEncodingNone::getString().

93  {
94  std::string s = t.getString();
95  return TextEncodingNone(mgr, s);
96 }
std::string getString() const
Definition: heavydbTypes.h:641

+ Here is the call graph for this function: