File csql_support.c
FileList > cubrid > src > executables > csql_support.c
Go to the source code of this file
#include "config.h"
#include <stdio.h>
#include <stdarg.h>
#include <signal.h>
#include <setjmp.h>
#include <assert.h>
#include <pwd.h>
#include "porting.h"
#include "csql.h"
#include "filesys.hpp"
#include "filesys_temp.hpp"
#include "memory_alloc.h"
#include "system_parameter.h"
#include "ddl_log.h"
Classes
Public Types
Public Static Attributes
Public Functions
Public Static Functions
Macros
Public Types Documentation
typedef CSQL_STATEMENT_STATE
typedef enum csql_statement_state CSQL_STATEMENT_STATE;
typedef CSQL_STATEMENT_SUBSTATE
typedef enum csql_statement_substate CSQL_STATEMENT_SUBSTATE;
enum csql_statement_state
enum csql_statement_state {
CSQL_STATE_GENERAL = 0,
CSQL_STATE_C_COMMENT,
CSQL_STATE_CPP_COMMENT,
CSQL_STATE_SQL_COMMENT,
CSQL_STATE_SINGLE_QUOTE,
CSQL_STATE_MYSQL_QUOTE,
CSQL_STATE_DOUBLE_QUOTE_IDENTIFIER,
CSQL_STATE_BACKTICK_IDENTIFIER,
CSQL_STATE_BRACKET_IDENTIFIER,
CSQL_STATE_STATEMENT_END
};
enum csql_statement_substate
enum csql_statement_substate {
CSQL_SUBSTATE_INITIAL = 0,
CSQL_SUBSTATE_SEEN_CREATE,
CSQL_SUBSTATE_SEEN_OR,
CSQL_SUBSTATE_SEEN_REPLACE,
CSQL_SUBSTATE_EXPECTING_IS_OR_AS,
CSQL_SUBSTATE_PL_LANG_SPEC,
CSQL_SUBSTATE_SEEN_LANGUAGE,
CSQL_SUBSTATE_PLCSQL_TEXT,
CSQL_SUBSTATE_SEEN_END
};
Public Static Attributes Documentation
variable csql_Edit_contents
CSQL_EDIT_CONTENTS csql_Edit_contents;
variable csql_Err_msg_map
CSQL_ERR_MSG_MAP csql_Err_msg_map[];
variable iq_Jmp_buf
variable iq_More_lines
variable iq_Num_more_lines
Public Functions Documentation
function csql_append_more_line
int csql_append_more_line (
int indent,
const char * line
)
function csql_check_server_down
void csql_check_server_down (
void
)
function csql_display_csql_err
void csql_display_csql_err (
int line_no,
int col_no
)
function csql_display_more_lines
void csql_display_more_lines (
const char * title
)
function csql_display_session_err
void csql_display_session_err (
DB_SESSION * session,
int line_no
)
function csql_edit_contents_append
int csql_edit_contents_append (
const char * str,
bool flag_append_new_line
)
function csql_edit_contents_clear
void csql_edit_contents_clear ()
function csql_edit_contents_finalize
void csql_edit_contents_finalize ()
function csql_edit_contents_get
char * csql_edit_contents_get ()
function csql_edit_read_file
int csql_edit_read_file (
FILE * fp
)
function csql_edit_write_file
int csql_edit_write_file (
FILE * fp
)
function csql_errmsg
const char * csql_errmsg (
int code
)
function csql_fputs
void csql_fputs (
const char * str,
FILE * fp
)
function csql_fputs_console_conv
void csql_fputs_console_conv (
const char * str,
FILE * fp
)
function csql_free_more_lines
void csql_free_more_lines (
void
)
function csql_get_real_path
char * csql_get_real_path (
const char * pathname
)
function csql_get_tmp_buf
char * csql_get_tmp_buf (
size_t size
)
int csql_invoke_formatter ()
function csql_invoke_system
void csql_invoke_system (
const char * command
)
function csql_invoke_system_editor
int csql_invoke_system_editor (
const char * argument
)
function csql_is_statement_complete
bool csql_is_statement_complete (
void
)
function csql_is_statement_in_block
bool csql_is_statement_in_block (
void
)
function csql_pclose
void csql_pclose (
FILE * pf,
FILE * fd
)
function csql_popen
FILE * csql_popen (
const char * cmd,
FILE * fd
)
function csql_walk_statement
void csql_walk_statement (
const char * str
)
function nonscr_display_error
void nonscr_display_error (
char * buffer,
int buf_length
)
Public Static Functions Documentation
function csql_edit_contents_expand
static int csql_edit_contents_expand (
int required_size
)
function csql_get_user_home
static int csql_get_user_home (
char * homebuf,
int bufsize
)
static void iq_format_err (
char * string,
int buf_size,
int line_no,
int col_no
)
static bool iq_input_device_is_a_tty (
void
)
function iq_output_device_is_a_tty
static bool iq_output_device_is_a_tty (
void
)
function iq_pipe_handler
static void iq_pipe_handler (
int sig_no
)
function is_identifier_letter
static bool is_identifier_letter (
const char c
)
function match_word_ci
static bool match_word_ci (
const char * word,
const char ** bufp
)
Macro Definition Documentation
define DEFAULT_DB_ERROR_MSG_LEVEL
#define DEFAULT_DB_ERROR_MSG_LEVEL `3 /* current max */`
define MORE_LINE_EXPANSION_UNIT
#define MORE_LINE_EXPANSION_UNIT `40`
define TAB_STOP
The documentation for this class was generated from the following file cubrid/src/executables/csql_support.c