Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/lib/rbmysql/constants.rb
Views: 11766
# coding: ascii-8bit1# Copyright (C) 2003-2008 TOMITA Masahiro2# mailto:[email protected]34class RbMysql5# Command6COM_SLEEP = 07COM_QUIT = 18COM_INIT_DB = 29COM_QUERY = 310COM_FIELD_LIST = 411COM_CREATE_DB = 512COM_DROP_DB = 613COM_REFRESH = 714COM_SHUTDOWN = 815COM_STATISTICS = 916COM_PROCESS_INFO = 1017COM_CONNECT = 1118COM_PROCESS_KILL = 1219COM_DEBUG = 1320COM_PING = 1421COM_TIME = 1522COM_DELAYED_INSERT = 1623COM_CHANGE_USER = 1724COM_BINLOG_DUMP = 1825COM_TABLE_DUMP = 1926COM_CONNECT_OUT = 2027COM_REGISTER_SLAVE = 2128COM_STMT_PREPARE = 2229COM_STMT_EXECUTE = 2330COM_STMT_SEND_LONG_DATA = 2431COM_STMT_CLOSE = 2532COM_STMT_RESET = 2633COM_SET_OPTION = 2734COM_STMT_FETCH = 2835COM_DAEMON = 2936COM_BINLOG_DUMP_GTID = 3037COM_RESET_CONNECTION = 313839# Client flag40CLIENT_LONG_PASSWORD = 1 # new more secure passwords41CLIENT_FOUND_ROWS = 1 << 1 # Found instead of affected rows42CLIENT_LONG_FLAG = 1 << 2 # Get all column flags43CLIENT_CONNECT_WITH_DB = 1 << 3 # One can specify db on connect44CLIENT_NO_SCHEMA = 1 << 4 # Don't allow database.table.column45CLIENT_COMPRESS = 1 << 5 # Can use compression protocol46CLIENT_ODBC = 1 << 6 # Odbc client47CLIENT_LOCAL_FILES = 1 << 7 # Can use LOAD DATA LOCAL48CLIENT_IGNORE_SPACE = 1 << 8 # Ignore spaces before '('49CLIENT_PROTOCOL_41 = 1 << 9 # New 4.1 protocol50CLIENT_INTERACTIVE = 1 << 10 # This is an interactive client51CLIENT_SSL = 1 << 11 # Switch to SSL after handshake52CLIENT_IGNORE_SIGPIPE = 1 << 12 # IGNORE sigpipes53CLIENT_TRANSACTIONS = 1 << 13 # Client knows about transactions54CLIENT_RESERVED = 1 << 14 # Old flag for 4.1 protocol55CLIENT_SECURE_CONNECTION = 1 << 15 # New 4.1 authentication56CLIENT_MULTI_STATEMENTS = 1 << 16 # Enable/disable multi-stmt support57CLIENT_MULTI_RESULTS = 1 << 17 # Enable/disable multi-results58CLIENT_PS_MULTI_RESULTS = 1 << 18 # Multi-results in PS-protocol59CLIENT_PLUGIN_AUTH = 1 << 19 # Client supports plugin authentication60CLIENT_CONNECT_ATTRS = 1 << 20 # Client supports connection attribute61CLIENT_PLUGIN_AUTH_LENENC_CLIENT_DATA = 1 << 21 # Enable authentication response packet to be larger than 255 bytes.62CLIENT_CAN_HANDLE_EXPIRED_PASSWORDS = 1 << 22 # Don't close the connection for a connection with expired password.63CLIENT_SESSION_TRACK = 1 << 23 # Capable of handling server state change information. Its a hint to the server to include the state change information in Ok packet.64CLIENT_DEPRECATE_EOF = 1 << 24 # Client no longer needs EOF packet65CLIENT_SSL_VERIFY_SERVER_CERT = 1 << 3066CLIENT_REMEMBER_OPTIONS = 1 << 316768# Connection Option69OPT_CONNECT_TIMEOUT = 070OPT_COMPRESS = 171OPT_NAMED_PIPE = 272INIT_COMMAND = 373READ_DEFAULT_FILE = 474READ_DEFAULT_GROUP = 575SET_CHARSET_DIR = 676SET_CHARSET_NAME = 777OPT_LOCAL_INFILE = 878OPT_PROTOCOL = 979SHARED_MEMORY_BASE_NAME = 1080OPT_READ_TIMEOUT = 1181OPT_WRITE_TIMEOUT = 1282OPT_USE_RESULT = 1383OPT_USE_REMOTE_CONNECTION = 1484OPT_USE_EMBEDDED_CONNECTION = 1585OPT_GUESS_CONNECTION = 1686SET_CLIENT_IP = 1787SECURE_AUTH = 1888REPORT_DATA_TRUNCATION = 1989OPT_RECONNECT = 2090OPT_SSL_VERIFY_SERVER_CERT = 219192# Server Option93OPTION_MULTI_STATEMENTS_ON = 094OPTION_MULTI_STATEMENTS_OFF = 19596# Server Status97SERVER_STATUS_IN_TRANS = 198SERVER_STATUS_AUTOCOMMIT = 1 << 199SERVER_MORE_RESULTS_EXISTS = 1 << 3100SERVER_QUERY_NO_GOOD_INDEX_USED = 1 << 4101SERVER_QUERY_NO_INDEX_USED = 1 << 5102SERVER_STATUS_CURSOR_EXISTS = 1 << 6103SERVER_STATUS_LAST_ROW_SENT = 1 << 7104SERVER_STATUS_DB_DROPPED = 1 << 8105SERVER_STATUS_NO_BACKSLASH_ESCAPES = 1 << 9106SERVER_STATUS_METADATA_CHANGED = 1 << 10107SERVER_QUERY_WAS_SLOW = 1 << 11108SERVER_PS_OUT_PARAMS = 1 << 12109SERVER_STATUS_IN_TRANS_READONLY = 1 << 13110SERVER_SESSION_STATE_CHANGED = 1 << 14111112# Refresh parameter113REFRESH_GRANT = 1114REFRESH_LOG = 1 << 1115REFRESH_TABLES = 1 << 2116REFRESH_HOSTS = 1 << 3117REFRESH_STATUS = 1 << 4118REFRESH_THREADS = 1 << 5119REFRESH_SLAVE = 1 << 6120REFRESH_MASTER = 1 << 7121REFRESH_ERROR_LOG = 1 << 8122REFRESH_ENGINE_LOG = 1 << 9123REFRESH_BINARY_LOG = 1 << 10124REFRESH_RELAY_LOG = 1 << 11125REFRESH_GENERAL_LOG = 1 << 12126REFRESH_SLOW_LOG = 1 << 13127REFRESH_READ_LOCK = 1 << 14128REFRESH_FAST = 1 << 15129REFRESH_QUERY_CACHE = 1 << 16130REFRESH_QUERY_CACHE_FREE = 1 << 17131REFRESH_DES_KEY_FILE = 1 << 18132REFRESH_USER_RESOURCES = 1 << 19133REFRESH_FOR_EXPORT = 1 << 20134REFRESH_OPTIMIZER_COSTS = 1 << 21135136class Field137# Field type138TYPE_DECIMAL = 0139TYPE_TINY = 1140TYPE_SHORT = 2141TYPE_LONG = 3142TYPE_FLOAT = 4143TYPE_DOUBLE = 5144TYPE_NULL = 6145TYPE_TIMESTAMP = 7146TYPE_LONGLONG = 8147TYPE_INT24 = 9148TYPE_DATE = 10149TYPE_TIME = 11150TYPE_DATETIME = 12151TYPE_YEAR = 13152TYPE_NEWDATE = 14153TYPE_VARCHAR = 15154TYPE_BIT = 16155TYPE_TIMESTAMP2 = 17156TYPE_DATETIME2 = 18157TYPE_TIME2 = 19158TYPE_JSON = 245159TYPE_NEWDECIMAL = 246160TYPE_ENUM = 247161TYPE_SET = 248162TYPE_TINY_BLOB = 249163TYPE_MEDIUM_BLOB = 250164TYPE_LONG_BLOB = 251165TYPE_BLOB = 252166TYPE_VAR_STRING = 253167TYPE_STRING = 254168TYPE_GEOMETRY = 255169TYPE_CHAR = TYPE_TINY170TYPE_INTERVAL = TYPE_ENUM171172# Flag173NOT_NULL_FLAG = 1174PRI_KEY_FLAG = 2175UNIQUE_KEY_FLAG = 4176MULTIPLE_KEY_FLAG = 8177BLOB_FLAG = 16178UNSIGNED_FLAG = 32179ZEROFILL_FLAG = 64180BINARY_FLAG = 128181ENUM_FLAG = 256182AUTO_INCREMENT_FLAG = 512183TIMESTAMP_FLAG = 1024184SET_FLAG = 2048185NO_DEFAULT_VALUE_FLAG = 4096186ON_UPDATE_NOW_FLAG = 8192187NUM_FLAG = 32768188PART_KEY_FLAG = 16384189GROUP_FLAG = 32768190UNIQUE_FLAG = 65536191BINCMP_FLAG = 131072192end193194class Stmt195# Cursor type196CURSOR_TYPE_NO_CURSOR = 0197CURSOR_TYPE_READ_ONLY = 1198CURSOR_TYPE_FOR_UPDATE = 2199CURSOR_TYPE_SCROLLABLE = 4200end201end202203