Skip to content

File jsp_cl.cpp

FileList > cubrid > src > sp > jsp_cl.cpp

Go to the source code of this file

  • #include "config.h"
  • #include <assert.h>
  • #include <sys/socket.h>
  • #include <vector>
  • #include <functional>
  • #include <chrono>
  • #include <ctime>
  • #include <iomanip>
  • #include <sstream>
  • #include "authenticate.h"
  • #include "error_manager.h"
  • #include "memory_alloc.h"
  • #include "dbtype.h"
  • #include "parser.h"
  • #include "parser_message.h"
  • #include "object_domain.h"
  • #include "object_primitive.h"
  • #include "object_representation.h"
  • #include "db.h"
  • #include "object_accessor.h"
  • #include "set_object.h"
  • #include "locator_cl.h"
  • #include "transaction_cl.h"
  • #include "schema_manager.h"
  • #include "numeric_opfunc.h"
  • #include "jsp_cl.h"
  • #include "system_parameter.h"
  • #include "network_interface_cl.h"
  • #include "unicode_support.h"
  • #include "pl_comm.h"
  • #include "pl_struct_compile.hpp"
  • #include "sp_catalog.hpp"
  • #include "authenticate_access_auth.hpp"
  • #include "pl_signature.hpp"
  • #include "oid.h"
  • #include "string_buffer.hpp"
  • #include "db_value_printer.hpp"
  • #include "execute_statement.h"

Public Attributes

Type Name
bool ssl_client

Public Static Attributes

Type Name
int call_cnt = 0
bool is_prepare_call = { [**false**](broker__monitor_8c.md#function-timeout), }
int server_port = -1

Public Functions

Type Name
int alter_stored_procedure_code (PARSER_CONTEXT * parser, MOP sp_mop, const char * name, const char * owner_str, int sp_recompile)
int jsp_alter_stored_procedure (PARSER_CONTEXT * parser, PT_NODE * statement)
int jsp_call_stored_procedure (PARSER_CONTEXT * parser, PT_NODE * statement)
int jsp_check_return_type_supported (DB_TYPE type)
int jsp_create_stored_procedure (PARSER_CONTEXT * parser, PT_NODE * statement)
int jsp_drop_stored_procedure (PARSER_CONTEXT * parser, PT_NODE * statement)
int jsp_find_sp_of_another_owner (const char * name, MOP * return_mop)
MOP jsp_find_stored_procedure (const char * name, DB_AUTH purpose)
MOP jsp_find_stored_procedure_code (const char * name)
PT_NODE * jsp_get_default_expr_node_list (PARSER_CONTEXT * parser, cubpl::pl_signature & sig)
char * jsp_get_name (MOP mop_p)
MOP jsp_get_owner (MOP mop_p)
char * jsp_get_owner_name (const char * name, char * buf, int buf_size)
int jsp_get_return_type (const char * name)
int jsp_get_sp_type (const char * name)
char * jsp_get_unique_name (MOP mop_p, char * buf, int buf_size)
int jsp_is_exist_stored_procedure (const char * name)
bool jsp_is_prepare_call ()
int jsp_make_pl_args (PARSER_CONTEXT * parser, PT_NODE * node, int num_params, DB_SET * param_set, cubpl::pl_signature & sig)
int jsp_make_pl_signature (PARSER_CONTEXT * parser, PT_NODE * node, PT_NODE * subquery_as_attr_list, cubpl::pl_signature & sig)
void jsp_set_prepare_call (void)
void jsp_unset_prepare_call (void)

Public Static Functions

Type Name
int check_execute_authorization (const MOP sp_obj, const DB_AUTH au_type)
int drop_stored_procedure (const char * name, SP_TYPE_ENUM expected_type)
int drop_stored_procedure_code (const char * name)
int jsp_check_out_param_in_query (PARSER_CONTEXT * parser, PT_NODE * node, int arg_mode)
int jsp_check_overflow_args (PARSER_CONTEXT * parser, PT_NODE * node, int num_params, int num_args)
int jsp_check_param_type_supported (DB_TYPE type, int mode)
char * jsp_check_stored_procedure_name (const char * str)
int jsp_default_value_string (PARSER_CONTEXT * parser, PT_NODE * node, std::string & out)
int jsp_default_value_string (PARSER_CONTEXT * parser, PT_NODE * node, bool & is_null, std::string & out)
int jsp_evaluate_arguments (PARSER_CONTEXT * parser, PT_NODE * statement, std::vector< std::reference_wrapper< DB_VALUE > > & args)
SP_MODE_ENUM jsp_map_pt_misc_to_sp_mode (PT_MISC_TYPE pt_enum)
SP_TYPE_ENUM jsp_map_pt_misc_to_sp_type (PT_MISC_TYPE pt_enum)
SP_DIRECTIVE_ENUM jsp_map_pt_to_sp_authid (PT_MISC_TYPE pt_authid)
SP_DIRECTIVE_ENUM jsp_map_pt_to_sp_dtrm_type (PT_MISC_TYPE pt_dtrm_type, SP_DIRECTIVE_ENUM directive)
PT_MISC_TYPE jsp_map_sp_type_to_pt_misc (SP_TYPE_ENUM sp_type)
int * pt_to_method_arglist (PARSER_CONTEXT * parser, PT_NODE * target, PT_NODE * node_list, PT_NODE * subquery_as_attr_list)

Macros

Type Name
define MAX_ARG_COUNT 64
define MAX_CALL_COUNT 16
define PT_NODE_SP_ARGS (node) ((node)-&gt;info.sp.param\_list)
define PT_NODE_SP_ARG_COMMENT (node) /* multi line expression */
define PT_NODE_SP_ARG_NAME (node) /* multi line expression */
define PT_NODE_SP_AUTHID (node) ((node)-&gt;info.sp.auth\_id)
define PT_NODE_SP_BODY (node) ((node)-&gt;info.sp.body)
define PT_NODE_SP_COMMENT (node) /* multi line expression */
define PT_NODE_SP_DETERMINISTIC_TYPE (node) ((node)-&gt;info.sp.dtrm\_type)
define PT_NODE_SP_IMPL (node) ((node)-&gt;info.sp.body-&gt;info.sp\_body.impl-&gt;info.value.data\_value.str-&gt;bytes)
define PT_NODE_SP_JAVA_METHOD (node) ((node)-&gt;info.sp.body-&gt;info.sp\_body.decl-&gt;info.value.data\_value.str-&gt;bytes)
define PT_NODE_SP_LANG (node) ((node)-&gt;info.sp.body-&gt;info.sp\_body.lang)
define PT_NODE_SP_NAME (node) /* multi line expression */
define PT_NODE_SP_RETURN_TYPE (node) ((node)-&gt;info.sp.ret\_type-&gt;info.name.original)
define PT_NODE_SP_TYPE (node) ((node)-&gt;info.sp.type)

Public Attributes Documentation

variable ssl_client

bool ssl_client;

Public Static Attributes Documentation

variable call_cnt

int call_cnt;

variable is_prepare_call

bool is_prepare_call[16];

variable server_port

int server_port;

Public Functions Documentation

function alter_stored_procedure_code

int alter_stored_procedure_code (
    PARSER_CONTEXT * parser,
    MOP sp_mop,
    const  char * name,
    const  char * owner_str,
    int sp_recompile
) 

function jsp_alter_stored_procedure

int jsp_alter_stored_procedure (
    PARSER_CONTEXT * parser,
    PT_NODE * statement
) 

function jsp_call_stored_procedure

int jsp_call_stored_procedure (
    PARSER_CONTEXT * parser,
    PT_NODE * statement
) 

function jsp_check_return_type_supported

int jsp_check_return_type_supported (
    DB_TYPE type
) 

function jsp_create_stored_procedure

int jsp_create_stored_procedure (
    PARSER_CONTEXT * parser,
    PT_NODE * statement
) 

function jsp_drop_stored_procedure

int jsp_drop_stored_procedure (
    PARSER_CONTEXT * parser,
    PT_NODE * statement
) 

function jsp_find_sp_of_another_owner

int jsp_find_sp_of_another_owner (
    const  char * name,
    MOP * return_mop
) 

function jsp_find_stored_procedure

MOP jsp_find_stored_procedure (
    const  char * name,
    DB_AUTH purpose
) 

function jsp_find_stored_procedure_code

MOP jsp_find_stored_procedure_code (
    const  char * name
) 

function jsp_get_default_expr_node_list

PT_NODE * jsp_get_default_expr_node_list (
    PARSER_CONTEXT * parser,
    cubpl::pl_signature & sig
) 

function jsp_get_name

char * jsp_get_name (
    MOP mop_p
) 

function jsp_get_owner

MOP jsp_get_owner (
    MOP mop_p
) 

function jsp_get_owner_name

char * jsp_get_owner_name (
    const  char * name,
    char * buf,
    int buf_size
) 

function jsp_get_return_type

int jsp_get_return_type (
    const  char * name
) 

function jsp_get_sp_type

int jsp_get_sp_type (
    const  char * name
) 

function jsp_get_unique_name

char * jsp_get_unique_name (
    MOP mop_p,
    char * buf,
    int buf_size
) 

function jsp_is_exist_stored_procedure

int jsp_is_exist_stored_procedure (
    const  char * name
) 

function jsp_is_prepare_call

bool jsp_is_prepare_call () 

function jsp_make_pl_args

int jsp_make_pl_args (
    PARSER_CONTEXT * parser,
    PT_NODE * node,
    int num_params,
    DB_SET * param_set,
    cubpl::pl_signature & sig
) 

function jsp_make_pl_signature

int jsp_make_pl_signature (
    PARSER_CONTEXT * parser,
    PT_NODE * node,
    PT_NODE * subquery_as_attr_list,
    cubpl::pl_signature & sig
) 

function jsp_set_prepare_call

void jsp_set_prepare_call (
    void
) 

function jsp_unset_prepare_call

void jsp_unset_prepare_call (
    void
) 

Public Static Functions Documentation

function check_execute_authorization

static int check_execute_authorization (
    const  MOP sp_obj,
    const  DB_AUTH au_type
) 

function drop_stored_procedure

static int drop_stored_procedure (
    const  char * name,
    SP_TYPE_ENUM expected_type
) 

function drop_stored_procedure_code

static int drop_stored_procedure_code (
    const  char * name
) 

function jsp_check_out_param_in_query

static int jsp_check_out_param_in_query (
    PARSER_CONTEXT * parser,
    PT_NODE * node,
    int arg_mode
) 

function jsp_check_overflow_args

static int jsp_check_overflow_args (
    PARSER_CONTEXT * parser,
    PT_NODE * node,
    int num_params,
    int num_args
) 

function jsp_check_param_type_supported

static int jsp_check_param_type_supported (
    DB_TYPE type,
    int mode
) 

function jsp_check_stored_procedure_name

static char * jsp_check_stored_procedure_name (
    const  char * str
) 

function jsp_default_value_string

static int jsp_default_value_string (
    PARSER_CONTEXT * parser,
    PT_NODE * node,
    std::string & out
) 

function jsp_default_value_string

static int jsp_default_value_string (
    PARSER_CONTEXT * parser,
    PT_NODE * node,
    bool & is_null,
    std::string & out
) 

function jsp_evaluate_arguments

static int jsp_evaluate_arguments (
    PARSER_CONTEXT * parser,
    PT_NODE * statement,
    std::vector< std::reference_wrapper < DB_VALUE > > & args
) 

function jsp_map_pt_misc_to_sp_mode

static SP_MODE_ENUM jsp_map_pt_misc_to_sp_mode (
    PT_MISC_TYPE pt_enum
) 

function jsp_map_pt_misc_to_sp_type

static SP_TYPE_ENUM jsp_map_pt_misc_to_sp_type (
    PT_MISC_TYPE pt_enum
) 

function jsp_map_pt_to_sp_authid

static SP_DIRECTIVE_ENUM jsp_map_pt_to_sp_authid (
    PT_MISC_TYPE pt_authid
) 

function jsp_map_pt_to_sp_dtrm_type

static SP_DIRECTIVE_ENUM jsp_map_pt_to_sp_dtrm_type (
    PT_MISC_TYPE pt_dtrm_type,
    SP_DIRECTIVE_ENUM directive
) 

function jsp_map_sp_type_to_pt_misc

static PT_MISC_TYPE jsp_map_sp_type_to_pt_misc (
    SP_TYPE_ENUM sp_type
) 

function pt_to_method_arglist

static int * pt_to_method_arglist (
    PARSER_CONTEXT * parser,
    PT_NODE * target,
    PT_NODE * node_list,
    PT_NODE * subquery_as_attr_list
) 

Macro Definition Documentation

define MAX_ARG_COUNT

#define MAX_ARG_COUNT `64`

define MAX_CALL_COUNT

#define MAX_CALL_COUNT `16`

define PT_NODE_SP_ARGS

#define PT_NODE_SP_ARGS (
    node
) `((node)->info.sp.param_list)`

define PT_NODE_SP_ARG_COMMENT

#define PT_NODE_SP_ARG_COMMENT (
    node
) `/* multi line expression */`

define PT_NODE_SP_ARG_NAME

#define PT_NODE_SP_ARG_NAME (
    node
) `/* multi line expression */`

define PT_NODE_SP_AUTHID

#define PT_NODE_SP_AUTHID (
    node
) `((node)->info.sp.auth_id)`

define PT_NODE_SP_BODY

#define PT_NODE_SP_BODY (
    node
) `((node)->info.sp.body)`

define PT_NODE_SP_COMMENT

#define PT_NODE_SP_COMMENT (
    node
) `/* multi line expression */`

define PT_NODE_SP_DETERMINISTIC_TYPE

#define PT_NODE_SP_DETERMINISTIC_TYPE (
    node
) `((node)->info.sp.dtrm_type)`

define PT_NODE_SP_IMPL

#define PT_NODE_SP_IMPL (
    node
) `((node)->info.sp.body->info.sp_body.impl->info.value.data_value.str->bytes)`

define PT_NODE_SP_JAVA_METHOD

#define PT_NODE_SP_JAVA_METHOD (
    node
) `((node)->info.sp.body->info.sp_body.decl->info.value.data_value.str->bytes)`

define PT_NODE_SP_LANG

#define PT_NODE_SP_LANG (
    node
) `((node)->info.sp.body->info.sp_body.lang)`

define PT_NODE_SP_NAME

#define PT_NODE_SP_NAME (
    node
) `/* multi line expression */`

define PT_NODE_SP_RETURN_TYPE

#define PT_NODE_SP_RETURN_TYPE (
    node
) `((node)->info.sp.ret_type->info.name.original)`

define PT_NODE_SP_TYPE

#define PT_NODE_SP_TYPE (
    node
) `((node)->info.sp.type)`


The documentation for this class was generated from the following file cubrid/src/sp/jsp_cl.cpp