File db_macro.c
FileList > compat > db_macro.c
Go to the source code of this file
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <ctype.h>
#include <string.h>
#include <assert.h>
#include "system_parameter.h"
#include "error_manager.h"
#include "db.h"
#include "db_value_printer.hpp"
#include "string_opfunc.h"
#include "set_object.h"
#include "cnv.h"
#include "tz_support.h"
#include "elo.h"
#include "db_elo.h"
#include "db_set_function.h"
#include "numeric_opfunc.h"
#include "object_primitive.h"
#include "object_representation.h"
#include "db_json.hpp"
#include "dbtype.h"
#include "memory_wrapper.hpp"
Classes
Public Types
Public Attributes
Public Static Attributes
Public Functions
| Type |
Name |
| bool |
IS_INVALID_PRECISION (int p, int m)
|
| int |
db_convert_json_into_scalar (const DB_VALUE * src, DB_VALUE * dest)
|
| const char * |
db_default_expression_string (DB_DEFAULT_EXPR_TYPE default_expr_type)
|
| DB_OBJECT * |
db_domain_class (const DB_DOMAIN * domain)
|
| int |
db_domain_codeset (const DB_DOMAIN * domain)
|
| int |
db_domain_collation_id (const DB_DOMAIN * domain)
|
| DB_DOMAIN * |
db_domain_next (const DB_DOMAIN * domain)
|
| int |
db_domain_precision (const DB_DOMAIN * domain)
|
| const char * |
db_domain_raw_json_schema (const DB_DOMAIN * domain)
|
| int |
db_domain_scale (const DB_DOMAIN * domain)
|
| DB_DOMAIN * |
db_domain_set (const DB_DOMAIN * domain)
|
| DB_TYPE |
db_domain_type (const DB_DOMAIN * domain)
|
| int |
db_enum_put_cs_and_collation (DB_VALUE * value, const int codeset, const int collation_id)
|
| DB_CURRENCY |
db_get_currency_default ()
|
| int |
db_get_deep_copy_of_json (const DB_JSON * src, DB_JSON * dst)
|
| char * |
db_get_json_raw_body (const DB_VALUE * value)
|
| int |
db_init_db_json_pointers (DB_JSON * val)
|
| bool |
db_is_json_doc_type (DB_TYPE type)
|
| bool |
db_is_json_value_type (DB_TYPE type)
|
| int |
db_set_compare (const DB_VALUE * value1, const DB_VALUE * value2)
|
| int |
db_string_put_cs_and_collation (DB_VALUE * value, const int codeset, const int collation_id)
|
| int |
db_string_truncate (DB_VALUE * value, const int precision)
|
| DB_DOMAIN * |
db_type_to_db_domain (const DB_TYPE type)
|
| int |
db_value_alter_type (DB_VALUE * value, const DB_TYPE type)
|
| int |
db_value_clear (DB_VALUE * value)
|
| int |
db_value_clear_array (DB_VALUE_ARRAY * value_array)
|
| int |
db_value_clone (DB_VALUE * src, DB_VALUE * dest)
|
| int |
db_value_coerce (const DB_VALUE * src, DB_VALUE * dest, const DB_DOMAIN * desired_domain)
|
| int |
db_value_compare (const DB_VALUE * value1, const DB_VALUE * value2)
|
| DB_VALUE * |
db_value_copy (DB_VALUE * value)
|
| DB_VALUE * |
db_value_create (void)
|
| int |
db_value_domain_default (DB_VALUE * value, const DB_TYPE type, const int precision, const int scale, const int codeset, const int collation_id, DB_ENUMERATION * enumeration)
|
| int |
db_value_domain_init (DB_VALUE * value, const DB_TYPE type, const int precision, const int scale)
|
| void |
db_value_domain_init_default (DB_VALUE * value, const DB_TYPE type)
|
| int |
db_value_domain_max (DB_VALUE * value, const DB_TYPE type, const int precision, const int scale, const int codeset, const int collation_id, const DB_ENUMERATION * enumeration)
|
| int |
db_value_domain_min (DB_VALUE * value, const DB_TYPE type, const int precision, const int scale, const int codeset, const int collation_id, const DB_ENUMERATION * enumeration)
|
| int |
db_value_domain_zero (DB_VALUE * value, const DB_TYPE type, const int precision, const int scale)
|
| void * |
db_value_eh_key (DB_VALUE * value)
|
| int |
db_value_equal (const DB_VALUE * value1, const DB_VALUE * value2)
|
| void |
db_value_fprint (FILE * fp, const DB_VALUE * value)
|
| int |
db_value_free (DB_VALUE * value)
|
| DB_DATA * |
db_value_get_db_data (DB_VALUE * value)
|
| double |
db_value_get_monetary_amount_as_double (const DB_VALUE * value)
|
| DB_CURRENCY |
db_value_get_monetary_currency (const DB_VALUE * value)
|
| bool |
db_value_is_corrupted (const DB_VALUE * value)
|
| void |
db_value_print (const DB_VALUE * value)
|
| int |
db_value_put (DB_VALUE * value, const DB_TYPE_C c_type, void * input, const int input_length)
|
| int |
db_value_put_db_data (DB_VALUE * value, const DB_DATA * data)
|
| int |
db_value_put_encoded_date (DB_VALUE * value, const DB_DATE * date)
|
| int |
db_value_put_encoded_time (DB_VALUE * value, const DB_TIME * time)
|
| int |
db_value_put_monetary_amount_as_double (DB_VALUE * value, const double amount)
|
| int |
db_value_put_monetary_currency (DB_VALUE * value, DB_CURRENCY const type)
|
| int |
db_value_put_null (DB_VALUE * value)
|
| bool |
db_value_type_is_collection (const DB_VALUE * value)
|
| int |
valcnv_convert_value_to_string (DB_VALUE * value_p)
|
Public Static Functions
| Type |
Name |
| int |
coerce_char_to_dbvalue (DB_VALUE * value, char * buf, const int buflen)
|
| VALCNV_BUFFER * |
valcnv_append_bytes (VALCNV_BUFFER * old_string, const char * new_tail, const size_t new_tail_length)
|
| VALCNV_BUFFER * |
valcnv_append_string (VALCNV_BUFFER * old_string, const char * new_tail)
|
| VALCNV_BUFFER * |
valcnv_convert_bit_to_string (VALCNV_BUFFER * buf, const DB_VALUE * value)
|
| VALCNV_BUFFER * |
valcnv_convert_data_to_string (VALCNV_BUFFER * buf, const DB_VALUE * value)
|
| VALCNV_BUFFER * |
valcnv_convert_db_value_to_string (VALCNV_BUFFER * buf, const DB_VALUE * value)
|
| VALCNV_BUFFER * |
valcnv_convert_double_to_string (VALCNV_BUFFER * buf, const double value)
|
| VALCNV_BUFFER * |
valcnv_convert_float_to_string (VALCNV_BUFFER * buf, const float value)
|
| VALCNV_BUFFER * |
valcnv_convert_money_to_string (const double value)
|
| VALCNV_BUFFER * |
valcnv_convert_set_to_string (VALCNV_BUFFER * buf, DB_SET * set)
|
Macros
Public Types Documentation
typedef VALCNV_BUFFER
typedef struct valcnv_buffer VALCNV_BUFFER;
enum db__macro_8c_1a157d5577a5b2f5986037d0d09c7dc77d
enum db__macro_8c_1a157d5577a5b2f5986037d0d09c7dc77d {
C_TO_VALUE_NOERROR = 0,
C_TO_VALUE_UNSUPPORTED_CONVERSION = -1,
C_TO_VALUE_CONVERSION_ERROR = -2,
C_TO_VALUE_TRUNCATION_ERROR = -3
};
Public Attributes Documentation
variable db_Connect_status
variable db_Disable_modifications
int db_Disable_modifications;
variable db_Keep_session
variable db_Row_count
variable db_Session_id
SESSION_ID db_Session_id;
Public Static Attributes Documentation
variable valcnv_Max_set_elements
int valcnv_Max_set_elements;
Public Functions Documentation
function IS_INVALID_PRECISION
inline bool IS_INVALID_PRECISION (
int p,
int m
)
function db_convert_json_into_scalar
int db_convert_json_into_scalar (
const DB_VALUE * src,
DB_VALUE * dest
)
function db_default_expression_string
const char * db_default_expression_string (
DB_DEFAULT_EXPR_TYPE default_expr_type
)
function db_domain_class
DB_OBJECT * db_domain_class (
const DB_DOMAIN * domain
)
function db_domain_codeset
int db_domain_codeset (
const DB_DOMAIN * domain
)
function db_domain_collation_id
int db_domain_collation_id (
const DB_DOMAIN * domain
)
function db_domain_next
DB_DOMAIN * db_domain_next (
const DB_DOMAIN * domain
)
function db_domain_precision
int db_domain_precision (
const DB_DOMAIN * domain
)
function db_domain_raw_json_schema
const char * db_domain_raw_json_schema (
const DB_DOMAIN * domain
)
function db_domain_scale
int db_domain_scale (
const DB_DOMAIN * domain
)
function db_domain_set
DB_DOMAIN * db_domain_set (
const DB_DOMAIN * domain
)
function db_domain_type
DB_TYPE db_domain_type (
const DB_DOMAIN * domain
)
function db_enum_put_cs_and_collation
int db_enum_put_cs_and_collation (
DB_VALUE * value,
const int codeset,
const int collation_id
)
function db_get_currency_default
DB_CURRENCY db_get_currency_default ()
function db_get_deep_copy_of_json
int db_get_deep_copy_of_json (
const DB_JSON * src,
DB_JSON * dst
)
function db_get_json_raw_body
char * db_get_json_raw_body (
const DB_VALUE * value
)
function db_init_db_json_pointers
int db_init_db_json_pointers (
DB_JSON * val
)
function db_is_json_doc_type
bool db_is_json_doc_type (
DB_TYPE type
)
function db_is_json_value_type
bool db_is_json_value_type (
DB_TYPE type
)
function db_set_compare
int db_set_compare (
const DB_VALUE * value1,
const DB_VALUE * value2
)
function db_string_put_cs_and_collation
int db_string_put_cs_and_collation (
DB_VALUE * value,
const int codeset,
const int collation_id
)
function db_string_truncate
int db_string_truncate (
DB_VALUE * value,
const int precision
)
function db_type_to_db_domain
DB_DOMAIN * db_type_to_db_domain (
const DB_TYPE type
)
function db_value_alter_type
int db_value_alter_type (
DB_VALUE * value,
const DB_TYPE type
)
function db_value_clear
int db_value_clear (
DB_VALUE * value
)
function db_value_clear_array
int db_value_clear_array (
DB_VALUE_ARRAY * value_array
)
function db_value_clone
int db_value_clone (
DB_VALUE * src,
DB_VALUE * dest
)
function db_value_coerce
int db_value_coerce (
const DB_VALUE * src,
DB_VALUE * dest,
const DB_DOMAIN * desired_domain
)
function db_value_compare
int db_value_compare (
const DB_VALUE * value1,
const DB_VALUE * value2
)
function db_value_copy
DB_VALUE * db_value_copy (
DB_VALUE * value
)
function db_value_create
DB_VALUE * db_value_create (
void
)
function db_value_domain_default
int db_value_domain_default (
DB_VALUE * value,
const DB_TYPE type,
const int precision,
const int scale,
const int codeset,
const int collation_id,
DB_ENUMERATION * enumeration
)
function db_value_domain_init
int db_value_domain_init (
DB_VALUE * value,
const DB_TYPE type,
const int precision,
const int scale
)
function db_value_domain_init_default
void db_value_domain_init_default (
DB_VALUE * value,
const DB_TYPE type
)
function db_value_domain_max
int db_value_domain_max (
DB_VALUE * value,
const DB_TYPE type,
const int precision,
const int scale,
const int codeset,
const int collation_id,
const DB_ENUMERATION * enumeration
)
function db_value_domain_min
int db_value_domain_min (
DB_VALUE * value,
const DB_TYPE type,
const int precision,
const int scale,
const int codeset,
const int collation_id,
const DB_ENUMERATION * enumeration
)
function db_value_domain_zero
int db_value_domain_zero (
DB_VALUE * value,
const DB_TYPE type,
const int precision,
const int scale
)
function db_value_eh_key
void * db_value_eh_key (
DB_VALUE * value
)
function db_value_equal
int db_value_equal (
const DB_VALUE * value1,
const DB_VALUE * value2
)
function db_value_fprint
void db_value_fprint (
FILE * fp,
const DB_VALUE * value
)
function db_value_free
int db_value_free (
DB_VALUE * value
)
function db_value_get_db_data
DB_DATA * db_value_get_db_data (
DB_VALUE * value
)
function db_value_get_monetary_amount_as_double
double db_value_get_monetary_amount_as_double (
const DB_VALUE * value
)
function db_value_get_monetary_currency
DB_CURRENCY db_value_get_monetary_currency (
const DB_VALUE * value
)
function db_value_is_corrupted
bool db_value_is_corrupted (
const DB_VALUE * value
)
function db_value_print
void db_value_print (
const DB_VALUE * value
)
function db_value_put
int db_value_put (
DB_VALUE * value,
const DB_TYPE_C c_type,
void * input,
const int input_length
)
function db_value_put_db_data
int db_value_put_db_data (
DB_VALUE * value,
const DB_DATA * data
)
function db_value_put_encoded_date
int db_value_put_encoded_date (
DB_VALUE * value,
const DB_DATE * date
)
function db_value_put_encoded_time
int db_value_put_encoded_time (
DB_VALUE * value,
const DB_TIME * time
)
function db_value_put_monetary_amount_as_double
int db_value_put_monetary_amount_as_double (
DB_VALUE * value,
const double amount
)
function db_value_put_monetary_currency
int db_value_put_monetary_currency (
DB_VALUE * value,
DB_CURRENCY const type
)
function db_value_put_null
int db_value_put_null (
DB_VALUE * value
)
function db_value_type_is_collection
bool db_value_type_is_collection (
const DB_VALUE * value
)
function valcnv_convert_value_to_string
int valcnv_convert_value_to_string (
DB_VALUE * value_p
)
Public Static Functions Documentation
function coerce_char_to_dbvalue
static int coerce_char_to_dbvalue (
DB_VALUE * value,
char * buf,
const int buflen
)
function valcnv_append_bytes
static VALCNV_BUFFER * valcnv_append_bytes (
VALCNV_BUFFER * old_string,
const char * new_tail,
const size_t new_tail_length
)
function valcnv_append_string
static VALCNV_BUFFER * valcnv_append_string (
VALCNV_BUFFER * old_string,
const char * new_tail
)
function valcnv_convert_bit_to_string
static VALCNV_BUFFER * valcnv_convert_bit_to_string (
VALCNV_BUFFER * buf,
const DB_VALUE * value
)
function valcnv_convert_data_to_string
static VALCNV_BUFFER * valcnv_convert_data_to_string (
VALCNV_BUFFER * buf,
const DB_VALUE * value
)
function valcnv_convert_db_value_to_string
static VALCNV_BUFFER * valcnv_convert_db_value_to_string (
VALCNV_BUFFER * buf,
const DB_VALUE * value
)
function valcnv_convert_double_to_string
static VALCNV_BUFFER * valcnv_convert_double_to_string (
VALCNV_BUFFER * buf,
const double value
)
function valcnv_convert_float_to_string
static VALCNV_BUFFER * valcnv_convert_float_to_string (
VALCNV_BUFFER * buf,
const float value
)
function valcnv_convert_money_to_string
static VALCNV_BUFFER * valcnv_convert_money_to_string (
const double value
)
function valcnv_convert_set_to_string
static VALCNV_BUFFER * valcnv_convert_set_to_string (
VALCNV_BUFFER * buf,
DB_SET * set
)
Macro Definition Documentation
define DB_NUMBER_ZERO
#define DB_NUMBER_ZERO `0`
define VALCNV_TOO_BIG_TO_MATTER
#define VALCNV_TOO_BIG_TO_MATTER `1024`
The documentation for this class was generated from the following file cubrid/src/compat/db_macro.c