Class: Mysql

Class | Mysql
In: | lib/active_record/vendor/mysql.rb
Parent: | Object

$Id: mysql.rb,v 1.24 2005/02/12 11:37:15 tommy Exp $

Copyright (C) 2003-2005 TOMITA Masahiro tommy@tmtm.org

### Methods

change_user character_set_name client_info client_info close connect connect create_db debug drop_db dump_debug_info escape_string escape_string finalizer get_client_info get_client_info get_host_info get_proto_info get_server_info handle_auth_fallback host_info init inspect kill list_dbs list_fields list_processes list_tables new options ping proto_info query quote quote read_one_row real_connect real_connect real_query refresh reload select_db server_info shutdown skip_result stat store_result use_result

### Classes and Modules

Class Mysql::Error
Class Mysql::Field
Class Mysql::Net
Class Mysql::Random
Class Mysql::Result

### Constants

VERSION | = | "4.0-ruby-0.2.6-plus-changes"
MAX_PACKET_LENGTH | = | 256*256*256-1
MAX_ALLOWED_PACKET | = | 1024*1024*1024
MYSQL_UNIX_ADDR | = | "/tmp/mysql.sock"
MYSQL_PORT | = | 3306
PROTOCOL_VERSION | = | 10
SCRAMBLE_LENGTH | = | 20
SCRAMBLE_LENGTH_323 | = | 8
COM_SLEEP | = | 0 |  | Command
COM_QUIT | = | 1
COM_INIT_DB | = | 2
COM_QUERY | = | 3
COM_FIELD_LIST | = | 4
COM_CREATE_DB | = | 5
COM_DROP_DB | = | 6
COM_REFRESH | = | 7
COM_SHUTDOWN | = | 8
COM_STATISTICS | = | 9
COM_PROCESS_INFO | = | 10
COM_CONNECT | = | 11
COM_PROCESS_KILL | = | 12
COM_DEBUG | = | 13
COM_PING | = | 14
COM_TIME | = | 15
COM_DELAYED_INSERT | = | 16
COM_CHANGE_USER | = | 17
COM_BINLOG_DUMP | = | 18
COM_TABLE_DUMP | = | 19
COM_CONNECT_OUT | = | 20
COM_REGISTER_SLAVE | = | 21
CLIENT_LONG_PASSWORD | = | 1 |  | Client flag
CLIENT_FOUND_ROWS | = | 1 << 1
CLIENT_LONG_FLAG | = | 1 << 2
CLIENT_CONNECT_WITH_DB | = | 1 << 3
CLIENT_NO_SCHEMA | = | 1 << 4
CLIENT_COMPRESS | = | 1 << 5
CLIENT_ODBC | = | 1 << 6
CLIENT_LOCAL_FILES | = | 1 << 7
CLIENT_IGNORE_SPACE | = | 1 << 8
CLIENT_PROTOCOL_41 | = | 1 << 9
CLIENT_INTERACTIVE | = | 1 << 10
CLIENT_SSL | = | 1 << 11
CLIENT_IGNORE_SIGPIPE | = | 1 << 12
CLIENT_TRANSACTIONS | = | 1 << 13
CLIENT_RESERVED | = | 1 << 14
CLIENT_SECURE_CONNECTION | = | 1 << 15
CLIENT_CAPABILITIES | = | CLIENT_LONG_PASSWORD|CLIENT_LONG_FLAG|CLIENT_TRANSACTIONS
PROTO_AUTH41 | = | CLIENT_PROTOCOL_41 | CLIENT_SECURE_CONNECTION
OPT_CONNECT_TIMEOUT | = | 0 |  | Connection Option
OPT_COMPRESS | = | 1
OPT_NAMED_PIPE | = | 2
INIT_COMMAND | = | 3
READ_DEFAULT_FILE | = | 4
READ_DEFAULT_GROUP | = | 5
SET_CHARSET_DIR | = | 6
SET_CHARSET_NAME | = | 7
OPT_LOCAL_INFILE | = | 8
SERVER_STATUS_IN_TRANS | = | 1 |  | Server Status
SERVER_STATUS_AUTOCOMMIT | = | 2
REFRESH_GRANT | = | 1 |  | Refresh parameter
REFRESH_LOG | = | 2
REFRESH_TABLES | = | 4
REFRESH_HOSTS | = | 8
REFRESH_STATUS | = | 16
REFRESH_THREADS | = | 32
REFRESH_SLAVE | = | 64
REFRESH_MASTER | = | 128

### Attributes

affected_rows | [R] |
field_count | [R] |
info | [R] |
insert_id | [R] |
query_with_result | [RW] |
status | [RW] |
thread_id | [R] |

### Public Class methods

debug(str)
escape_string(str)
finalizer(net)
get_client_info()
init()
new(*args)
real_connect(*args)

### Public Instance methods

change_user(user="", passwd="", db="")
character_set_name()
client_info()

Alias for get_client_info

client_info()

Alias for get_client_info

close()
connect(host=nil, user=nil, passwd=nil, db=nil, port=nil, socket=nil, flag=nil)

Alias for real_connect

connect(host=nil, user=nil, passwd=nil, db=nil, port=nil, socket=nil, flag=nil)

Alias for real_connect

create_db(db)
drop_db(db)
dump_debug_info()
escape_string(str)
get_client_info()
get_host_info()
get_proto_info()
get_server_info()
handle_auth_fallback(pkt, passwd)
host_info()

Alias for get_host_info

inspect()
kill(id)
list_dbs(db=nil)
list_fields(table, field=nil)
list_processes()
list_tables(table=nil)
options(option, arg=nil)
ping()
proto_info()

Alias for get_proto_info

query(query)
quote(str)

Alias for escape_string

quote(str)

Alias for escape_string

read_one_row(field_count)
real_connect(host=nil, user=nil, passwd=nil, db=nil, port=nil, socket=nil, flag=nil)
real_query(query)
refresh(r)
reload()
select_db(db)
server_info()

Alias for get_server_info

shutdown()
skip_result()
stat()
store_result()
use_result()

[Validate]