File string_opfunc.h¶
FileList > cubrid > src > query > string_opfunc.h
Go to the source code of this file
#include "config.h"#include "dbtype_def.h"#include "intl_support.h"#include "language_support.h"#include "numeric_opfunc.h"#include "object_domain.h"#include "thread_compat.hpp"#include <functional>#include "string_regex.hpp"
Public Types¶
| Type | Name |
|---|---|
| enum | MISC_OPERAND |
| enum | TIMESTAMP_FORMAT |
Public Functions¶
Macros¶
| Type | Name |
|---|---|
| define | DATETIMETZ_BUF_SIZE ([**DATETIME\_BUF\_SIZE**](string__opfunc_8h.md#define-datetime_buf_size) + [**TIMEZONE\_BUF\_SIZE**](string__opfunc_8h.md#define-timezone_buf_size)) |
| define | DATETIME_BUF_SIZE ([**TIMESTAMP\_BUF\_SIZE**](string__opfunc_8h.md#define-timestamp_buf_size) + 4) |
| define | DATETIME_IS_NULL (dt) (([**dt**](broker__monitor_8c.md#function-timeout))->date == [**UINT\_MAX**](broker__monitor_8c.md#function-timeout) && ([**dt**](broker__monitor_8c.md#function-timeout))->time == [**UINT\_MAX**](broker__monitor_8c.md#function-timeout)) |
| define | DATETIME_NULL_VALUE { [**UINT\_MAX**](broker__monitor_8c.md#function-timeout), [**UINT\_MAX**](broker__monitor_8c.md#function-timeout) } |
| define | DATE_BUF_SIZE 64 |
| define | LIKE_WILDCARD_MATCH_MANY '%' |
| define | LIKE_WILDCARD_MATCH_ONE '[**\_**](broker__monitor_8c.md#function-timeout)' |
| define | NUM_BUF_SIZE 64 |
| define | NUM_MISC_OPERANDS 12 |
| define | QSTR_CHAR_COMPARE (id, string1, size1, string2, size2, ti) [**QSTR\_COMPARE**](string__opfunc_8h.md#define-qstr_compare)([**id**](thread__worker__pool__impl_8hpp.md#enum-id), [**string1**](broker__monitor_8c.md#function-timeout), [**size1**](broker__monitor_8c.md#function-timeout), [**string2**](broker__monitor_8c.md#function-timeout), [**size2**](broker__monitor_8c.md#function-timeout), [**ti**](broker__monitor_8c.md#function-timeout)) |
| define | QSTR_COMPARE (id, string1, size1, string2, size2, ti) /* multi line expression */ |
| define | QSTR_DATETIME_LENGTH 26 |
| define | QSTR_IS_ANY_CHAR (s) ([**QSTR\_IS\_CHAR**](string__opfunc_8h.md#define-qstr_is_char)(s)) |
| define | QSTR_IS_ANY_CHAR_OR_BIT (s) ([**QSTR\_IS\_ANY\_CHAR**](string__opfunc_8h.md#define-qstr_is_any_char)(s) \|\| [**QSTR\_IS\_BIT**](string__opfunc_8h.md#define-qstr_is_bit)(s)) |
| define | QSTR_IS_BIT (s) (((s) == DB\_TYPE\_BIT) \|\| ((s) == DB\_TYPE\_VARBIT)) |
| define | QSTR_IS_CHAR (s) (((s) == DB\_TYPE\_CHAR) \|\| ((s) == DB\_TYPE\_VARCHAR)) |
| define | QSTR_IS_FIXED_LENGTH (s) (((s) == DB\_TYPE\_CHAR) \|\| ((s) == DB\_TYPE\_BIT)) |
| define | QSTR_IS_LIKE_WILDCARD_CHAR (ch) /* multi line expression */ |
| define | QSTR_IS_VARIABLE_LENGTH (s) (((s) == DB\_TYPE\_VARCHAR) \|\| ((s) == DB\_TYPE\_VARBIT)) |
| define | QSTR_MATCH (id, string1, size1, string2, size2, esc, has_last_escape, match_size) /* multi line expression */ |
| define | QSTR_NEXT_ALPHA_CHAR (id, cur_chr, size, next_chr, len) /* multi line expression */ |
| define | QSTR_NUM_BYTES (a) ((([**a**](broker__monitor_8c.md#function-timeout)) + 7) / 8) |
| define | QSTR_SPLIT_KEY (id, is_desc, str1, size1, str2, size2, k, s, ti) /* multi line expression */ |
| define | TIMESTAMPTZ_BUF_SIZE ([**TIMESTAMP\_BUF\_SIZE**](string__opfunc_8h.md#define-timestamp_buf_size) + [**TIMEZONE\_BUF\_SIZE**](string__opfunc_8h.md#define-timezone_buf_size)) |
| define | TIMESTAMP_BUF_SIZE ([**TIME\_BUF\_SIZE**](broker__tester_8c.md#define-time_buf_size) + [**DATE\_BUF\_SIZE**](string__opfunc_8h.md#define-date_buf_size)) |
| define | TIMEZONE_BUF_SIZE 64 |
| define | TIME_BUF_SIZE 64 |
Public Types Documentation¶
enum MISC_OPERAND¶
enum MISC_OPERAND {
LEADING,
TRAILING,
BOTH,
YEAR,
MONTH,
DAY,
HOUR,
MINUTE,
SECOND,
MILLISECOND,
SUBSTRING,
SUBSTR
};
enum TIMESTAMP_FORMAT¶
enum TIMESTAMP_FORMAT {
DT_END = -2,
DT_INVALID = -1,
DT_NORMAL,
DT_YYYY,
DT_YY,
DT_MM,
DT_MONTH,
DT_MON,
DT_DD,
DT_CC,
DT_Q,
DT_DAY,
DT_DY,
DT_AM,
DT_A_M,
DT_PM,
DT_P_M,
DT_HH,
DT_H,
DT_HH12,
DT_HH24,
DT_MI,
DT_SS,
DT_MS,
DT_TEXT,
DT_PUNCTUATION,
DT_D,
DT_TZR,
DT_TZD,
DT_TZH,
DT_TZM
};
Public Functions Documentation¶
function bit_compare¶
int bit_compare (
const unsigned char * string1,
int size1,
const unsigned char * string2,
int size2
)
function char_compare¶
int char_compare (
const unsigned char * string1,
int size1,
const unsigned char * string2,
int size2
)
function count_leap_years_up_to¶
function count_nonleap_years_up_to¶
function db_add_days_to_year¶
function db_add_months¶
function db_add_time¶
int db_add_time (
const DB_VALUE * left,
const DB_VALUE * right,
DB_VALUE * result,
const TP_DOMAIN * domain
)
function db_ascii¶
function db_bigint_to_binary_string¶
function db_bit_string_coerce¶
int db_bit_string_coerce (
const DB_VALUE * src_string,
DB_VALUE * dest_string,
DB_DATA_STATUS * data_status
)
function db_bit_to_blob¶
function db_blob_from_file¶
function db_blob_length¶
function db_blob_to_bit¶
int db_blob_to_bit (
const DB_VALUE * src_value,
const DB_VALUE * length_value,
DB_VALUE * result_value
)
function db_char_string_coerce¶
int db_char_string_coerce (
const DB_VALUE * src_string,
DB_VALUE * dest_string,
DB_DATA_STATUS * data_status
)
function db_char_to_blob¶
function db_char_to_clob¶
function db_clob_from_file¶
function db_clob_length¶
function db_clob_to_char¶
int db_clob_to_char (
const DB_VALUE * src_value,
const DB_VALUE * codeset_value,
DB_VALUE * result_value
)
function db_compress_like_pattern¶
int db_compress_like_pattern (
const DB_VALUE * const pattern,
DB_VALUE * compressed_pattern,
const bool has_escape_char,
const char * escape_str
)
function db_conv¶
int db_conv (
const DB_VALUE * num,
const DB_VALUE * from_base,
const DB_VALUE * to_base,
DB_VALUE * result
)
function db_conv_tz¶
function db_convert_sec_to_time¶
function db_convert_time_to_sec¶
function db_convert_to_time¶
int db_convert_to_time (
const DB_VALUE * src_hour,
const DB_VALUE * src_minute,
const DB_VALUE * src_second,
DB_VALUE * result
)
function db_date_add_interval_days¶
function db_date_add_interval_expr¶
int db_date_add_interval_expr (
DB_VALUE * result,
const DB_VALUE * date,
const DB_VALUE * expr,
const int unit
)
function db_date_dbval¶
function db_date_diff¶
function db_date_format¶
int db_date_format (
const DB_VALUE * date_value,
const DB_VALUE * format,
const DB_VALUE * date_lang,
DB_VALUE * result,
const TP_DOMAIN * domain
)
function db_date_sub_interval_days¶
function db_date_sub_interval_expr¶
int db_date_sub_interval_expr (
DB_VALUE * result,
const DB_VALUE * date,
const DB_VALUE * expr,
const int unit
)
function db_datetime_to_timestamp¶
function db_find_string_in_in_set¶
function db_format¶
int db_format (
const DB_VALUE * number_text,
const DB_VALUE * decimals,
const DB_VALUE * number_lang,
DB_VALUE * result,
const TP_DOMAIN * domain
)
function db_from_tz¶
function db_from_unixtime¶
int db_from_unixtime (
const DB_VALUE * src_date,
const DB_VALUE * format,
const DB_VALUE * date_lang,
DB_VALUE * result,
const TP_DOMAIN * domain
)
function db_get_cs_coll_info¶
function db_get_date_dayofyear¶
function db_get_date_format¶
function db_get_date_from_days¶
function db_get_date_quarter¶
function db_get_date_totaldays¶
function db_get_date_week¶
function db_get_datetime_from_dbvalue¶
int db_get_datetime_from_dbvalue (
const DB_VALUE * src_date,
int * year,
int * month,
int * day,
int * hour,
int * minute,
int * second,
int * millisecond,
const char ** endp
)
function db_get_info_for_like_optimization¶
int db_get_info_for_like_optimization (
const DB_VALUE * const pattern,
const bool has_escape_char,
const char * escape_str,
int * const num_logical_chars,
int * const last_safe_logical_pos,
int * const num_match_many,
int * const num_match_one
)
function db_get_like_optimization_bounds¶
int db_get_like_optimization_bounds (
const DB_VALUE * const pattern,
DB_VALUE * bound,
const bool has_escape_char,
const char * escape_str,
const bool compute_lower_bound,
const int last_safe_logical_pos
)
function db_get_string_length¶
function db_get_time_from_dbvalue¶
int db_get_time_from_dbvalue (
const DB_VALUE * src_date,
int * hour,
int * minute,
int * second,
int * millisecond
)
function db_hex¶
function db_inet_aton¶
function db_inet_ntoa¶
function db_json_convert_to_utf8¶
function db_json_copy_and_convert_to_utf8¶
int db_json_copy_and_convert_to_utf8 (
const DB_VALUE * src_dbval,
DB_VALUE * dest_dbval,
const DB_VALUE ** json_str_dbval
)
function db_last_day¶
function db_like_bound¶
int db_like_bound (
const DB_VALUE * const src_pattern,
const DB_VALUE * const src_escape,
DB_VALUE * const result_bound,
const bool compute_lower_bound
)
function db_months_between¶
int db_months_between (
const DB_VALUE * start_mon,
const DB_VALUE * end_mon,
DB_VALUE * result_mon
)
function db_new_time¶
int db_new_time (
DB_VALUE * time_val,
DB_VALUE * tz_source,
DB_VALUE * tz_dest,
DB_VALUE * result_time
)
function db_null_terminate_string¶
function db_str_to_date¶
int db_str_to_date (
const DB_VALUE * src_date,
const DB_VALUE * src_format,
const DB_VALUE * date_lang,
DB_VALUE * result_date,
TP_DOMAIN * domain
)
function db_string_aes_decrypt¶
function db_string_aes_encrypt¶
function db_string_bit_length¶
function db_string_byte_length¶
function db_string_char_length¶
function db_string_chr¶
function db_string_compare¶
function db_string_concatenate¶
int db_string_concatenate (
const DB_VALUE * string1,
const DB_VALUE * string2,
DB_VALUE * result,
DB_DATA_STATUS * data_status
)
function db_string_convert_to¶
int db_string_convert_to (
const DB_VALUE * src_string,
DB_VALUE * dest_string,
INTL_CODESET dest_codeset,
int dest_col
)
function db_string_elt¶
function db_string_escape_str¶
int db_string_escape_str (
const char * src_str,
size_t src_size,
char ** res_string,
size_t * dest_size
)
function db_string_extract_dbval¶
int db_string_extract_dbval (
const MISC_OPERAND extr_operand,
DB_VALUE * dbval_p,
DB_VALUE * result_p,
TP_DOMAIN * domain_p
)
function db_string_fix_string_size¶
function db_string_from_base64¶
function db_string_index_prefix¶
int db_string_index_prefix (
const DB_VALUE * string1,
const DB_VALUE * string2,
const DB_VALUE * index_type,
DB_VALUE * prefix_index
)
function db_string_insert_substring¶
int db_string_insert_substring (
DB_VALUE * src_string,
const DB_VALUE * position,
const DB_VALUE * length,
DB_VALUE * sub_string,
DB_VALUE * result
)
function db_string_instr¶
int db_string_instr (
const DB_VALUE * src_string,
const DB_VALUE * sub_string,
const DB_VALUE * start_pos,
DB_VALUE * result
)
function db_string_like¶
int db_string_like (
const DB_VALUE * src_string,
const DB_VALUE * pattern,
const DB_VALUE * esc_char,
int * result
)
function db_string_limit_size_string¶
int db_string_limit_size_string (
DB_VALUE * src_string,
DB_VALUE * result,
const int new_size,
int * spare_bytes
)
function db_string_lower¶
function db_string_make_empty_typed_string¶
int db_string_make_empty_typed_string (
DB_VALUE * db_val,
const DB_TYPE db_type,
int precision,
int codeset,
int collation_id
)
function db_string_md5¶
function db_string_pad¶
int db_string_pad (
const MISC_OPERAND pad_operand,
const DB_VALUE * src_string,
const DB_VALUE * pad_length,
const DB_VALUE * pad_charset,
DB_VALUE * padded_string
)
function db_string_position¶
int db_string_position (
const DB_VALUE * sub_string,
const DB_VALUE * src_string,
DB_VALUE * result
)
function db_string_quote¶
function db_string_regexp_count¶
int db_string_regexp_count (
DB_VALUE * result,
DB_VALUE * args,
const int num_args,
cub_compiled_regex ** comp_regex
)
function db_string_regexp_instr¶
int db_string_regexp_instr (
DB_VALUE * result,
DB_VALUE * args,
const int num_args,
cub_compiled_regex ** comp_regex
)
function db_string_regexp_like¶
int db_string_regexp_like (
DB_VALUE * result,
DB_VALUE * args,
const int num_args,
cub_compiled_regex ** comp_regex
)
function db_string_regexp_replace¶
int db_string_regexp_replace (
DB_VALUE * result,
DB_VALUE * args,
const int num_args,
cub_compiled_regex ** comp_regex
)
function db_string_regexp_substr¶
int db_string_regexp_substr (
DB_VALUE * result,
DB_VALUE * args,
const int num_args,
cub_compiled_regex ** comp_regex
)
function db_string_repeat¶
function db_string_replace¶
int db_string_replace (
const DB_VALUE * src_string,
const DB_VALUE * srch_string,
const DB_VALUE * repl_string,
DB_VALUE * replaced_string
)
function db_string_reverse¶
function db_string_rlike¶
int db_string_rlike (
const DB_VALUE * src_string,
const DB_VALUE * pattern,
const DB_VALUE * case_sensitive,
cub_compiled_regex ** comp_regex,
int * result
)
function db_string_sha_one¶
function db_string_sha_two¶
function db_string_space¶
function db_string_substring¶
int db_string_substring (
const MISC_OPERAND substr_operand,
const DB_VALUE * src_string,
const DB_VALUE * start_position,
const DB_VALUE * extraction_length,
DB_VALUE * sub_string
)
function db_string_substring_index¶
int db_string_substring_index (
DB_VALUE * src_string,
DB_VALUE * delim_string,
const DB_VALUE * count,
DB_VALUE * result
)
function db_string_to_base64¶
function db_string_translate¶
int db_string_translate (
const DB_VALUE * src_string,
const DB_VALUE * from_string,
const DB_VALUE * to_string,
DB_VALUE * transed_string
)
function db_string_trim¶
int db_string_trim (
const MISC_OPERAND tr_operand,
const DB_VALUE * trim_charset,
const DB_VALUE * src_string,
DB_VALUE * trimmed_string
)
function db_string_unique_prefix¶
int db_string_unique_prefix (
const DB_VALUE * db_string1,
const DB_VALUE * db_string2,
DB_VALUE * db_result,
TP_DOMAIN * key_domain
)
function db_string_upper¶
function db_sys_date¶
function db_sys_date_and_epoch_time¶
function db_sys_datetime¶
function db_sys_time¶
function db_sys_timestamp¶
function db_sys_timezone¶
function db_time_dbval¶
function db_time_diff¶
int db_time_diff (
const DB_VALUE * datetime_value1,
const DB_VALUE * datetime_value2,
DB_VALUE * result
)
function db_time_format¶
int db_time_format (
const DB_VALUE * src_time,
const DB_VALUE * src_format,
const DB_VALUE * date_lang,
DB_VALUE * result_time,
const TP_DOMAIN * domain
)
function db_timestamp¶
int db_timestamp (
const DB_VALUE * src_datetime1,
const DB_VALUE * src_time2,
DB_VALUE * result_datetime
)
function db_timestamp_to_datetime¶
function db_to_char¶
int db_to_char (
const DB_VALUE * src_value,
const DB_VALUE * format_or_length,
const DB_VALUE * lang_str,
DB_VALUE * result_str,
const TP_DOMAIN * domain
)
function db_to_date¶
int db_to_date (
const DB_VALUE * src_str,
const DB_VALUE * format_str,
const DB_VALUE * date_lang,
DB_VALUE * result_date
)
function db_to_datetime¶
int db_to_datetime (
const DB_VALUE * src_str,
const DB_VALUE * format_str,
const DB_VALUE * date_lang,
const DB_TYPE type,
DB_VALUE * result_datetime
)
function db_to_number¶
int db_to_number (
const DB_VALUE * src_str,
const DB_VALUE * format_str,
const DB_VALUE * number_lang,
DB_VALUE * result_num
)
function db_to_time¶
int db_to_time (
const DB_VALUE * src_str,
const DB_VALUE * format_str,
const DB_VALUE * date_lang,
const DB_TYPE type,
DB_VALUE * result_time
)
function db_to_timestamp¶
int db_to_timestamp (
const DB_VALUE * src_str,
const DB_VALUE * format_str,
const DB_VALUE * date_lang,
const DB_TYPE type,
DB_VALUE * result_timestamp
)
function db_tz_offset¶
function db_unix_timestamp¶
function db_value_to_enumeration_value¶
int db_value_to_enumeration_value (
const DB_VALUE * src,
DB_VALUE * result,
const TP_DOMAIN * enum_domain
)
function get_day¶
function get_last_day¶
function init_builtin_calendar_names¶
function qstr_bin_to_hex¶
function qstr_bit_to_bin¶
function qstr_bit_to_hex_coerce¶
void qstr_bit_to_hex_coerce (
char * buffer,
int buffer_size,
const char * src,
int src_length,
int pad_flag,
int * copy_size,
int * truncation
)
function qstr_compare¶
int qstr_compare (
const unsigned char * string1,
int size1,
const unsigned char * string2,
int size2
)
function qstr_hex_to_bin¶
function qstr_make_typed_string¶
void qstr_make_typed_string (
const DB_TYPE db_type,
DB_VALUE * value,
const int precision,
DB_CONST_C_CHAR src,
const int s_unit,
const int codeset,
const int collation_id
)
function qstr_pad_string¶
function qstr_trim_trailing¶
void qstr_trim_trailing (
const unsigned char * trim_charset_ptr,
int trim_charset_size,
const unsigned char * src_ptr,
DB_TYPE src_type,
int src_length,
int src_size,
INTL_CODESET codeset,
int * trail_trimmed_length,
int * trail_trimmed_size,
bool skip_spaces
)
function varbit_compare¶
int varbit_compare (
const unsigned char * string1,
int size1,
const unsigned char * string2,
int size2
)
Macro Definition Documentation¶
define DATETIMETZ_BUF_SIZE¶
define DATETIME_BUF_SIZE¶
define DATETIME_IS_NULL¶
define DATETIME_NULL_VALUE¶
define DATE_BUF_SIZE¶
define LIKE_WILDCARD_MATCH_MANY¶
define LIKE_WILDCARD_MATCH_ONE¶
define NUM_BUF_SIZE¶
define NUM_MISC_OPERANDS¶
define QSTR_CHAR_COMPARE¶
#define QSTR_CHAR_COMPARE (
id,
string1,
size1,
string2,
size2,
ti
) `QSTR_COMPARE ( id , string1 , size1 , string2 , size2 , ti )`
define QSTR_COMPARE¶
define QSTR_DATETIME_LENGTH¶
define QSTR_IS_ANY_CHAR¶
define QSTR_IS_ANY_CHAR_OR_BIT¶
define QSTR_IS_BIT¶
define QSTR_IS_CHAR¶
define QSTR_IS_FIXED_LENGTH¶
define QSTR_IS_LIKE_WILDCARD_CHAR¶
define QSTR_IS_VARIABLE_LENGTH¶
define QSTR_MATCH¶
#define QSTR_MATCH (
id,
string1,
size1,
string2,
size2,
esc,
has_last_escape,
match_size
) `/* multi line expression */`
define QSTR_NEXT_ALPHA_CHAR¶
define QSTR_NUM_BYTES¶
define QSTR_SPLIT_KEY¶
#define QSTR_SPLIT_KEY (
id,
is_desc,
str1,
size1,
str2,
size2,
k,
s,
ti
) `/* multi line expression */`
define TIMESTAMPTZ_BUF_SIZE¶
define TIMESTAMP_BUF_SIZE¶
define TIMEZONE_BUF_SIZE¶
define TIME_BUF_SIZE¶
The documentation for this class was generated from the following file cubrid/src/query/string_opfunc.h