github.com/nakagami/firebirdsql@v0.9.10/consts.go (about) 1 /******************************************************************************* 2 The MIT License (MIT) 3 4 Copyright (c) 2013-2019 Hajime Nakagami 5 6 Permission is hereby granted, free of charge, to any person obtaining a copy of 7 this software and associated documentation files (the "Software"), to deal in 8 the Software without restriction, including without limitation the rights to 9 use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 the Software, and to permit persons to whom the Software is furnished to do so, 11 subject to the following conditions: 12 13 The above copyright notice and this permission notice shall be included in all 14 copies or substantial portions of the Software. 15 16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 *******************************************************************************/ 23 24 package firebirdsql 25 26 const ( 27 ISC_TIME_SECONDS_PRECISION = 10000 28 29 // Protocol Types (accept_type) 30 ptype_batch_send = 3 // Batch sends, no asynchrony 31 ptype_out_of_band = 4 // Batch sends w/ out of band notification 32 ptype_lazy_send = 5 // Deferred packets delivery 33 34 // Protocol Version 35 PROTOCOL_VERSION13 = 13 36 PROTOCOL_VERSION16 = 16 37 38 CNCT_user = 1 39 CNCT_passwd = 2 40 CNCT_host = 4 41 CNCT_group = 5 42 CNCT_user_verification = 6 43 CNCT_specific_data = 7 44 CNCT_plugin_name = 8 45 CNCT_login = 9 46 CNCT_plugin_list = 10 47 CNCT_client_crypt = 11 48 49 isc_info_end = 1 50 isc_info_truncated = 2 51 isc_info_error = 3 52 isc_info_data_not_ready = 4 53 isc_info_length = 126 54 isc_info_flag_end = 127 55 56 isc_info_db_id = 4 57 isc_info_reads = 5 58 isc_info_writes = 6 59 isc_info_fetches = 7 60 isc_info_marks = 8 61 isc_info_implementation = 11 62 isc_info_version = 12 63 isc_info_base_level = 13 64 isc_info_page_size = 14 65 isc_info_num_buffers = 15 66 isc_info_limbo = 16 67 isc_info_current_memory = 17 68 isc_info_max_memory = 18 69 isc_info_window_turns = 19 70 isc_info_license = 20 71 isc_info_allocation = 21 72 isc_info_attachment_id = 22 73 isc_info_read_seq_count = 23 74 isc_info_read_idx_count = 24 75 isc_info_insert_count = 25 76 isc_info_update_count = 26 77 isc_info_delete_count = 27 78 isc_info_backout_count = 28 79 isc_info_purge_count = 29 80 isc_info_expunge_count = 30 81 isc_info_sweep_interval = 31 82 isc_info_ods_version = 32 83 isc_info_ods_minor_version = 33 84 isc_info_no_reserve = 34 85 isc_info_logfile = 35 86 isc_info_cur_logfile_name = 36 87 isc_info_cur_log_part_offset = 37 88 isc_info_num_wal_buffers = 38 89 isc_info_wal_buffer_size = 39 90 isc_info_wal_ckpt_length = 40 91 isc_info_wal_cur_ckpt_interval = 41 92 isc_info_wal_prv_ckpt_fname = 42 93 isc_info_wal_prv_ckpt_poffset = 43 94 isc_info_wal_recv_ckpt_fname = 44 95 isc_info_wal_recv_ckpt_poffset = 45 96 isc_info_wal_grpc_wait_usecs = 47 97 isc_info_wal_num_io = 48 98 isc_info_wal_avg_io_size = 49 99 isc_info_wal_num_commits = 50 100 isc_info_wal_avg_grpc_size = 51 101 isc_info_forced_writes = 52 102 isc_info_user_names = 53 103 isc_info_page_errors = 54 104 isc_info_record_errors = 55 105 isc_info_bpage_errors = 56 106 isc_info_dpage_errors = 57 107 isc_info_ipage_errors = 58 108 isc_info_ppage_errors = 59 109 isc_info_tpage_errors = 60 110 isc_info_set_page_buffers = 61 111 isc_info_db_sql_dialect = 62 112 isc_info_db_read_only = 63 113 isc_info_db_size_in_pages = 64 114 isc_info_att_charset = 101 115 isc_info_db_class = 102 116 isc_info_firebird_version = 103 117 isc_info_oldest_transaction = 104 118 isc_info_oldest_active = 105 119 isc_info_oldest_snapshot = 106 120 isc_info_next_transaction = 107 121 isc_info_db_provider = 108 122 isc_info_active_transactions = 109 123 isc_info_active_tran_count = 110 124 isc_info_creation_date = 111 125 isc_info_db_file_size = 112 126 127 // isc_info_sql_records items 128 isc_info_req_select_count = 13 129 isc_info_req_insert_count = 14 130 isc_info_req_update_count = 15 131 isc_info_req_delete_count = 16 132 133 isc_info_svc_svr_db_info = 50 134 isc_info_svc_get_license = 51 135 isc_info_svc_get_license_mask = 52 136 isc_info_svc_get_config = 53 137 isc_info_svc_version = 54 138 isc_info_svc_server_version = 55 139 isc_info_svc_implementation = 56 140 isc_info_svc_capabilities = 57 141 isc_info_svc_user_dbpath = 58 142 isc_info_svc_get_env = 59 143 isc_info_svc_get_env_lock = 60 144 isc_info_svc_get_env_msg = 61 145 isc_info_svc_line = 62 146 isc_info_svc_to_eof = 63 147 isc_info_svc_timeout = 64 148 isc_info_svc_get_licensed_users = 65 149 isc_info_svc_limbo_trans = 66 150 isc_info_svc_running = 67 151 isc_info_svc_get_users = 68 152 153 isc_tpb_version1 = 1 154 isc_tpb_version3 = 3 155 isc_tpb_consistency = 1 156 isc_tpb_concurrency = 2 157 isc_tpb_shared = 3 158 isc_tpb_protected = 4 159 isc_tpb_exclusive = 5 160 isc_tpb_wait = 6 161 isc_tpb_nowait = 7 162 isc_tpb_read = 8 163 isc_tpb_write = 9 164 isc_tpb_lock_read = 10 165 isc_tpb_lock_write = 11 166 isc_tpb_verb_time = 12 167 isc_tpb_commit_time = 13 168 isc_tpb_ignore_limbo = 14 169 isc_tpb_read_committed = 15 170 isc_tpb_autocommit = 16 171 isc_tpb_rec_version = 17 172 isc_tpb_no_rec_version = 18 173 isc_tpb_restart_requests = 19 174 isc_tpb_no_auto_undo = 20 175 isc_tpb_lock_timeout = 21 176 177 // Service Parameter Block parameter 178 isc_spb_version1 = 1 179 isc_spb_current_version = 2 180 isc_spb_version = isc_spb_current_version 181 isc_spb_user_name = 28 // isc_dpb_user_name 182 isc_spb_sys_user_name = 19 // isc_dpb_sys_user_name 183 isc_spb_sys_user_name_enc = 31 // isc_dpb_sys_user_name_enc 184 isc_spb_password = 29 // isc_dpb_password 185 isc_spb_password_enc = 30 // isc_dpb_password_enc 186 isc_spb_command_line = 105 187 isc_spb_dbname = 106 188 isc_spb_verbose = 107 189 isc_spb_options = 108 190 isc_spb_address_path = 109 191 isc_spb_process_id = 110 192 isc_spb_trusted_auth = 111 193 isc_spb_process_name = 112 194 isc_spb_trusted_role = 113 195 isc_spb_connect_timeout = 57 // isc_dpb_connect_timeout 196 isc_spb_dummy_packet_interval = 58 // isc_dpb_dummy_packet_interval 197 isc_spb_sql_role_name = 60 // isc_dpb_sql_role_name 198 199 //Database Parameter Block Types 200 isc_dpb_version1 = 1 201 isc_dpb_page_size = 4 202 isc_dpb_num_buffers = 5 203 isc_dpb_force_write = 24 204 isc_dpb_user_name = 28 205 isc_dpb_password = 29 206 isc_dpb_password_enc = 30 207 isc_dpb_lc_ctype = 48 208 isc_dpb_overwrite = 54 209 isc_dpb_connect_timeout = 57 210 isc_dpb_dummy_packet_interval = 58 211 isc_dpb_sql_role_name = 60 212 isc_dpb_set_page_buffers = 61 213 isc_dpb_sql_dialect = 63 214 isc_dpb_set_db_charset = 68 215 isc_dpb_process_id = 71 216 isc_dpb_no_db_triggers = 72 217 isc_dpb_trusted_auth = 73 218 isc_dpb_process_name = 74 219 isc_dpb_utf8_filename = 77 220 isc_dpb_specific_auth_data = 84 221 isc_dpb_auth_plugin_list = 85 222 isc_dpb_auth_plugin_name = 86 223 isc_dpb_config = 87 224 isc_dpb_nolinger = 88 225 isc_dpb_reset_icu = 89 226 isc_dpb_map_attach = 90 227 isc_dpb_session_time_zone = 91 228 229 // backup 230 isc_spb_bkp_file = 5 231 isc_spb_bkp_factor = 6 232 isc_spb_bkp_length = 7 233 isc_spb_bkp_ignore_checksums = 0x01 234 isc_spb_bkp_ignore_limbo = 0x02 235 isc_spb_bkp_metadata_only = 0x04 236 isc_spb_bkp_no_garbage_collect = 0x08 237 isc_spb_bkp_old_descriptions = 0x10 238 isc_spb_bkp_non_transportable = 0x20 239 isc_spb_bkp_convert = 0x40 240 isc_spb_bkp_expand = 0x8 241 242 // restore 243 isc_spb_res_buffers = 9 244 isc_spb_res_page_size = 10 245 isc_spb_res_length = 11 246 isc_spb_res_access_mode = 12 247 isc_spb_res_deactivate_idx = 0x0100 248 isc_spb_res_no_shadow = 0x0200 249 isc_spb_res_no_validity = 0x0400 250 isc_spb_res_one_at_a_time = 0x0800 251 isc_spb_res_replace = 0x1000 252 isc_spb_res_create = 0x2000 253 isc_spb_res_use_all_space = 0x4000 254 255 // trace 256 isc_spb_trc_id = 1 257 isc_spb_trc_name = 2 258 isc_spb_trc_cfg = 3 259 260 // isc_info_svc_svr_db_info params 261 isc_spb_num_att = 5 262 isc_spb_num_db = 6 263 264 // isc_info_svc_db_stats params 265 isc_spb_sts_data_pages = 0x01 266 isc_spb_sts_db_log = 0x02 267 isc_spb_sts_hdr_pages = 0x04 268 isc_spb_sts_idx_pages = 0x08 269 isc_spb_sts_sys_relations = 0x10 270 isc_spb_sts_record_versions = 0x20 271 isc_spb_sts_table = 0x40 272 isc_spb_sts_nocreation = 0x80 273 274 // isc_action_svc_repair params 275 isc_spb_rpr_validate_db = 0x01 276 isc_spb_rpr_sweep_db = 0x02 277 isc_spb_rpr_mend_db = 0x04 278 isc_spb_rpr_list_limbo_trans = 0x08 279 isc_spb_rpr_check_db = 0x10 280 isc_spb_rpr_ignore_checksum = 0x20 281 isc_spb_rpr_kill_shadows = 0x40 282 isc_spb_rpr_full = 0x80 283 284 // Service Action Items 285 isc_action_svc_backup = 1 286 isc_action_svc_restore = 2 287 isc_action_svc_repair = 3 288 isc_action_svc_add_user = 4 289 isc_action_svc_delete_user = 5 290 isc_action_svc_modify_user = 6 291 isc_action_svc_display_user = 7 292 isc_action_svc_properties = 8 293 isc_action_svc_add_license = 9 294 isc_action_svc_remove_license = 10 295 isc_action_svc_db_stats = 11 296 isc_action_svc_get_ib_log = 12 297 isc_action_svc_get_fb_log = 12 298 isc_action_svc_nbak = 20 299 isc_action_svc_nrest = 21 300 isc_action_svc_trace_start = 22 301 isc_action_svc_trace_stop = 23 302 isc_action_svc_trace_suspend = 24 303 isc_action_svc_trace_resume = 25 304 isc_action_svc_trace_list = 26 305 isc_action_svc_set_mapping = 27 306 isc_action_svc_drop_mapping = 28 307 isc_action_svc_display_user_adm = 29 308 isc_action_svc_last = 30 309 310 // Transaction informatino items 311 isc_info_tra_id = 4 312 isc_info_tra_oldest_interesting = 5 313 isc_info_tra_oldest_snapshot = 6 314 isc_info_tra_oldest_active = 7 315 isc_info_tra_isolation = 8 316 isc_info_tra_access = 9 317 isc_info_tra_lock_timeout = 10 318 319 // SQL information items 320 isc_info_sql_select = 4 321 isc_info_sql_bind = 5 322 isc_info_sql_num_variables = 6 323 isc_info_sql_describe_vars = 7 324 isc_info_sql_describe_end = 8 325 isc_info_sql_sqlda_seq = 9 326 isc_info_sql_message_seq = 10 327 isc_info_sql_type = 11 328 isc_info_sql_sub_type = 12 329 isc_info_sql_scale = 13 330 isc_info_sql_length = 14 331 isc_info_sql_null_ind = 15 332 isc_info_sql_field = 16 333 isc_info_sql_relation = 17 334 isc_info_sql_owner = 18 335 isc_info_sql_alias = 19 336 isc_info_sql_sqlda_start = 20 337 isc_info_sql_stmt_type = 21 338 isc_info_sql_get_plan = 22 339 isc_info_sql_records = 23 340 isc_info_sql_batch_fetch = 24 341 342 isc_info_sql_stmt_select = 1 343 isc_info_sql_stmt_insert = 2 344 isc_info_sql_stmt_update = 3 345 isc_info_sql_stmt_delete = 4 346 isc_info_sql_stmt_ddl = 5 347 isc_info_sql_stmt_get_segment = 6 348 isc_info_sql_stmt_put_segment = 7 349 isc_info_sql_stmt_exec_procedure = 8 350 isc_info_sql_stmt_start_trans = 9 351 isc_info_sql_stmt_commit = 10 352 isc_info_sql_stmt_rollback = 11 353 isc_info_sql_stmt_select_for_upd = 12 354 isc_info_sql_stmt_set_generator = 13 355 isc_info_sql_stmt_savepoint = 14 356 357 isc_arg_end = 0 358 isc_arg_gds = 1 359 isc_arg_string = 2 360 isc_arg_cstring = 3 361 isc_arg_number = 4 362 isc_arg_interpreted = 5 363 isc_arg_vms = 6 364 isc_arg_unix = 7 365 isc_arg_domain = 8 366 isc_arg_dos = 9 367 isc_arg_mpexl = 10 368 isc_arg_mpexl_ipc = 11 369 isc_arg_next_mach = 15 370 isc_arg_netware = 16 371 isc_arg_win32 = 17 372 isc_arg_warning = 18 373 isc_arg_sql_state = 19 374 375 op_connect = 1 376 op_exit = 2 377 op_accept = 3 378 op_reject = 4 379 op_protocrol = 5 380 op_disconnect = 6 381 op_response = 9 382 op_attach = 19 383 op_create = 20 384 op_detach = 21 385 op_transaction = 29 386 op_commit = 30 387 op_rollback = 31 388 op_open_blob = 35 389 op_get_segment = 36 390 op_put_segment = 37 391 op_close_blob = 39 392 op_info_database = 40 393 op_info_transaction = 42 394 op_batch_segments = 44 395 op_que_events = 48 396 op_cancel_events = 49 397 op_commit_retaining = 50 398 op_event = 52 399 op_connect_request = 53 400 op_aux_connect = 53 401 op_create_blob2 = 57 402 op_allocate_statement = 62 403 op_execute = 63 404 op_execute_immediate = 64 405 op_fetch = 65 406 op_fetch_response = 66 407 op_free_statement = 67 408 op_prepare_statement = 68 409 op_info_sql = 70 410 op_dummy = 71 411 op_execute2 = 76 412 op_sql_response = 78 413 op_drop_database = 81 414 op_service_attach = 82 415 op_service_detach = 83 416 op_service_info = 84 417 op_service_start = 85 418 op_rollback_retaining = 86 419 // FB3 420 op_update_account_info = 87 421 op_authenticate_user = 88 422 op_partial = 89 423 op_trusted_auth = 90 424 op_cancel = 91 425 op_cont_auth = 92 426 op_ping = 93 427 op_accept_data = 94 428 op_abort_aux_connection = 95 429 op_crypt = 96 430 op_crypt_key_callback = 97 431 op_cond_accept = 98 432 ) 433 434 const ( 435 ISOLATION_LEVEL_READ_COMMITED_LEGACY = iota 436 ISOLATION_LEVEL_READ_COMMITED 437 ISOLATION_LEVEL_REPEATABLE_READ 438 ISOLATION_LEVEL_SERIALIZABLE 439 ISOLATION_LEVEL_READ_COMMITED_RO 440 ) 441 442 // Event 443 const ( 444 p_req_async = 1 // Auxiliary asynchronous port 445 EPB_version1 = 1 446 partner_identification = 0 447 address_of_ast_routine = 0 448 argument_to_ast_routine = 0 449 ) 450 451 // op_cancel kind 452 const ( 453 fb_cancel_disable = 1 454 fb_cancel_enable = 2 455 fb_cancel_raise = 3 456 fb_cancel_abort = 4 457 )