{"id":15405872,"url":"https://github.com/elia/mysql","last_synced_at":"2025-10-11T07:42:16.636Z","repository":{"id":460638,"uuid":"84899","full_name":"elia/mysql","owner":"elia","description":"the MySQL/Ruby library wrapped into a gem that installs smoothly","archived":false,"fork":false,"pushed_at":"2009-06-22T23:22:02.000Z","size":165,"stargazers_count":8,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-08-09T02:40:07.047Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elia.png","metadata":{"files":{"readme":"README.html","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2008-12-04T10:32:44.000Z","updated_at":"2019-08-13T13:45:33.000Z","dependencies_parsed_at":"2022-07-04T17:32:50.764Z","dependency_job_id":null,"html_url":"https://github.com/elia/mysql","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/elia/mysql","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elia%2Fmysql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elia%2Fmysql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elia%2Fmysql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elia%2Fmysql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elia","download_url":"https://codeload.github.com/elia/mysql/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elia%2Fmysql/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279006626,"owners_count":26084131,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-11T02:00:06.511Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-01T16:18:49.342Z","updated_at":"2025-10-11T07:42:16.620Z","avatar_url":"https://github.com/elia.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\u003e\n\u003c!-- $Id: README.html 244 2009-02-01 08:43:39Z tommy $ --\u003e\n\u003chtml\u003e\n  \u003chead\u003e\n    \u003cmeta http-equiv=\"content-style-type\" content=\"text/css\"\u003e\n    \u003clink rel=stylesheet type=\"text/css\" href=\"tommy.css\"\u003e\n    \u003clink rev=made href=\"mailto:tommy@tmtm.org\"\u003e\n    \u003ctitle\u003eMySQL/Ruby\u003c/title\u003e\n  \u003c/head\u003e\n\n  \u003cbody\u003e\n    \u003ch1\u003eMySQL/Ruby\u003c/h1\u003e\n    \u003cp\u003e\u003ca href=\"README_ja.html\"\u003e[Japanese]\u003c/a\u003e\u003c/p\u003e\n    \u003chr\u003e\n    \u003cp\u003e\n      This is the \u003ca href=\"http://www.mysql.com\"\u003eMySQL\u003c/a\u003e API module for Ruby.\n      It provides the same functions for Ruby programs that the MySQL C API provides for C programs.\n    \u003c/p\u003e\n\n    \u003ch2\u003eDownload\u003c/h2\u003e\n    \u003ca href=\"http://tmtm.org/downloads/mysql/ruby/\"\u003etmtm.org\u003c/a\u003e\n\n    \u003ch2\u003eRequirement\u003c/h2\u003e\n    \u003cul\u003e\n      \u003cli\u003eMySQL 5.0.67\n      \u003cli\u003eRuby 1.8.7, 1.9.1\n    \u003c/ul\u003e\n    \u003cp\u003e\n      The module may work for other versions, but that has not been verified.\n    \u003c/p\u003e\n\n    \u003ch2\u003eLicense\u003c/h2\u003e\n    \u003cp\u003e\n      This program is under \u003ca href=\"http://www.ruby-lang.org/en/LICENSE.txt\"\u003eRuby's license\u003c/a\u003e.\n    \u003c/p\u003e\n\n    \u003ch2\u003eInstall\u003c/h2\u003e\n    \u003cp\u003e\n      1st:\n    \u003c/p\u003e\n    \u003cpre class=\"code\"\u003e\n% ruby extconf.rb\n\u003c/pre\u003e\n    \u003cp\u003e\n      or\n    \u003c/p\u003e\n    \u003cpre class=\"code\"\u003e\n% ruby extconf.rb --with-mysql-dir=/usr/local/mysql\n\u003c/pre\u003e\n    \u003cp\u003e\n      or\n    \u003c/p\u003e\n    \u003cpre clas=\"code\"\u003e\n% ruby extconf.rb --with-mysql-config\n\u003c/pre\u003e\n    \u003cp\u003e\n      then\n    \u003c/p\u003e\n    \u003cpre\u003e\n% make\n\u003c/pre\u003e\n    \u003cp\u003e\n      extconf.rb has following options:\n    \u003c/p\u003e\n    \u003cdl\u003e\n      \u003cdt\u003e--with-mysql-include=\u003ci\u003edir\u003c/i\u003e\n      \u003cdd\u003e\n\tMySQL header file directory. Default is /usr/local/include.\n\n      \u003cdt\u003e--with-mysql-lib=\u003ci\u003edir\u003c/i\u003e\n      \u003cdd\u003e\n\tMySQL library directory. Default is /usr/local/lib.\n\n      \u003cdt\u003e--with-mysql-dir=\u003ci\u003edir\u003c/i\u003e\n      \u003cdd\u003e\n\tSame as --with-mysql-include=\u003ci\u003edir\u003c/i\u003e/include,\n\t--with-mysql-lib=\u003ci\u003edir\u003c/i\u003e/lib.\n\n      \u003cdt\u003e--with-mysql-config[=\u003ci\u003e/path/to/mysql_config\u003c/i\u003e]\n      \u003cdd\u003e\n\tGet compile-parameter from mysql_config command.\n    \u003c/dl\u003e\n    \u003cp\u003e\n      2nd:\n    \u003c/p\u003e\n    \u003cpre class=\"code\"\u003e\n% ruby ./test.rb -- [\u003ci\u003ehostname\u003c/i\u003e [\u003ci\u003euser\u003c/i\u003e [\u003ci\u003epasswd\u003c/i\u003e [\u003ci\u003edbname\u003c/i\u003e [\u003ci\u003eport\u003c/i\u003e [\u003ci\u003esocket\u003c/i\u003e [\u003ci\u003eflag\u003c/i\u003e]]]]]]]\n\u003c/pre\u003e\n\n    \u003cp\u003e\n      3rd:\n    \u003c/p\u003e\n    \u003cpre class=\"code\"\u003e\n# make install\n\u003c/pre\u003e\n\n    \u003ch3\u003eNote\u003c/h3\u003e\n    \u003cp\u003e\n      If you get error like 'libmysqlclient not found' when testing,\n      you need to specify the directory in which the library is\n      located so that make can find it.\n    \u003c/p\u003e\n    \u003cpre class=\"code\"\u003e\n% env LD_RUN_PATH=\u003ci\u003elibmysqlclient.so directory\u003c/i\u003e make\n\u003c/pre\u003e\n    \u003cp\u003e\n      test.rb is tested on Linux only.\n    \u003c/p\u003e\n\n    \u003ch2\u003eUsage\u003c/h2\u003e\n    \u003cp\u003e\n      The names of methods provided by this module basically are the\n      same as the names of the functions in the C API, except that the\n      Ruby method names do not begin with a 'mysql_' prefix. For\n      example, the Ruby query() method corresponds to the C API\n      mysql_query() function. For details on the use of each Ruby\n      method, see the descriptions of the corresponding C functions in\n      the MySQL Reference Manual.\n    \u003c/p\u003e\n    \u003cp\u003e\n      Some Ruby methods may be invoked under other names that serve as\n      equivalent aliases, as noted below.\n    \u003c/p\u003e\n    \u003cp\u003e\n      If an error occurs when a method executes, it raises a\n      Mysql::Error exception.\n    \u003c/p\u003e\n\n    \u003ch2\u003eMysql class\u003c/h2\u003e\n    \u003ch3\u003eCLASS METHODS\u003c/h3\u003e\n    \u003cdl\u003e\n      \u003cdt\u003einit()\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t  It return Mysql object. It not connect to mysqld.\n\t\u003c/p\u003e\n\n      \u003cdt\u003ereal_connect(host=nil, user=nil, passwd=nil, db=nil, port=nil, sock=nil, flag=nil)\n      \u003cdt\u003econnect(host=nil, user=nil, passwd=nil, db=nil, port=nil, sock=nil, flag=nil)\n      \u003cdt\u003enew(host=nil, user=nil, passwd=nil, db=nil, port=nil, sock=nil, flag=nil)\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t  connect to mysqld and return Mysql object.\n\t\u003c/p\u003e\n\n      \u003cdt\u003eescape_string(str)\n      \u003cdt\u003equote(str)\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t  quote string for insert/update.\n\t\u003c/p\u003e\n\n      \u003cdt\u003eget_client_info()\n      \u003cdt\u003eclient_info()\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t  return client version information.\n\t\u003c/p\u003e\n\n      \u003cdt\u003eget_client_version()\n      \u003cdt\u003eclient_version()\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t  return client version as number.\n\t\u003c/p\u003e\n\n      \u003cdt\u003edebug(str)\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t  same as C API mysql_debug().\n\t\u003c/p\u003e\n    \u003c/dl\u003e\n\n    \u003ch3\u003eOBJECT METHODS\u003c/h3\u003e\n    \u003cdl\u003e\n      \u003cdt\u003eoptions(opt, val=nil)\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t  same as C API mysql_options().\n\t\u003c/p\u003e\n\n      \u003cdt\u003ereal_connect(host=nil, user=nil, passwd=nil, db=nil, port=nil, sock=nil, flag=nil)\n      \u003cdt\u003econnect(host=nil, user=nil, passwd=nil, db=nil, port=nil, sock=nil, flag=nil)\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t  same as Mysql.real_connect().\n\t\u003c/p\u003e\n\n      \u003cdt\u003eaffected_rows()\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t  return affected rows.\n\t\u003c/p\u003e\n\n      \u003cdt\u003eautocommit(mode)\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t  set autocommit mode.\n\t\u003c/p\u003e\n\n      \u003cdt\u003echange_user(user=nil, passwd=nil, db=nil)\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t  change user.\n\t\u003c/p\u003e\n\n      \u003cdt\u003echaracter_set_name()\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t  return character set.\n\t\u003c/p\u003e\n\n      \u003cdt\u003eclose()\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t  close connection.\n\t\u003c/p\u003e\n\n      \u003cdt\u003ecommit()\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t  commit transaction.\n\t\u003c/p\u003e\n\n      \u003cdt\u003ecreate_db(db)\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t  create database.\n\t\u003c/p\u003e\n\n      \u003cdt\u003edrop_db(db)\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t  drop database.\n\t\u003c/p\u003e\n\n      \u003cdt\u003edump_debug_info()\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t  same as C API mysql_dump_debug_info().\n\t\u003c/p\u003e\n\n      \u003cdt\u003eerrno()\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t  return error number.\n\t\u003c/p\u003e\n\n      \u003cdt\u003eerror()\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t  return error message.\n\t\u003c/p\u003e\n\n      \u003cdt\u003eescape_string(str)\n      \u003cdt\u003equote(str)\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t  quote strings for insert/update.\n\t  same as C API mysql_real_escape_string().\n\t\u003c/p\u003e\n\n      \u003cdt\u003efield_count()\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t  return number of columns of last query.\n\t\u003c/p\u003e\n\n      \u003cdt\u003eget_client_info()\n      \u003cdt\u003eclient_info()\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t  return client version information.\n\t\u003c/p\u003e\n\n      \u003cdt\u003eget_client_version()\n      \u003cdt\u003eclient_version()\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t  return client version number.\n\t\u003c/p\u003e\n\n      \u003cdt\u003eget_host_info()\n      \u003cdt\u003ehost_info()\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t  return connection information.\n\t\u003c/p\u003e\n\n      \u003cdt\u003eget_proto_info()\n      \u003cdt\u003eproto_info()\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t  return connection protocol version.\n\t\u003c/p\u003e\n\n      \u003cdt\u003eget_server_info()\n      \u003cdt\u003eserver_info()\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t  return server version information.\n\t\u003c/p\u003e\n\n      \u003cdt\u003eget_server_version()\n      \u003cdt\u003eserver_version()\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t  return server version number.\n\t\u003c/p\u003e\n\n      \u003cdt\u003einfo()\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t  return information of last query.\n\t\u003c/p\u003e\n\n      \u003cdt\u003einsert_id()\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t  return last AUTO_INCREMENT value.\n\t\u003c/p\u003e\n\n      \u003cdt\u003ekill(id)\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t  kill thread.\n\t\u003c/p\u003e\n\n      \u003cdt\u003elist_dbs(db=nil)\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t  return database list.\n\t\u003c/p\u003e\n\n      \u003cdt\u003elist_fields(table, field=nil)\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t  return Mysql::Result object.\n\t\u003c/p\u003e\n\n      \u003cdt\u003elist_processes()\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t  return Mysql::Result object.\n\t\u003c/p\u003e\n\n      \u003cdt\u003elist_tables(table=nil)\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t  return table list Array.\n\t\u003c/p\u003e\n\n      \u003cdt\u003emore_results?()\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t  returns true if more results exist from the currently executed query.\n\t\u003c/p\u003e\n\n      \u003cdt\u003enext_result()\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t  returns true if more results exist from the currently executed query.\n\t  after this, you do store_result() to get result table of query.\n\t\u003c/p\u003e\n\n      \u003cdt\u003eping()\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t  check server.\n\t\u003c/p\u003e\n\n      \u003cdt\u003eprepare(q)\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t\u003c/p\u003e\n\n      \u003cdt\u003equery(q)\n      \u003cdt\u003ereal_query(q)\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t  do query and store_result(). return Mysql::Result object.\n\t  If query_with_result is false, it does not store_result().\n\t\u003c/p\u003e\n\n      \u003cdt\u003equery(q) {|res| ...}\n      \u003cdt\u003ereal_query(q) {|res| ...}\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t  do query and execute block with Mysql::Result object.\n          Mysql::Result object is freed when exiting block.\n          If multiple statement mode, it does repeat block each query.\n        \u003c/p\u003e\n        \u003cp\u003e\n          Since MySQL/Ruby 2.8, it no longer turn on multiple statement mode automatically.\n          If you want to turn on multiple statement mode, set Mysql::CLIENT_MULTI_STATEMENTS for Mysql.connect or execute Mysql#set_server_option(Mysql::OPTION_MULTI_STATEMENTS_ON).\n        \u003c/p\u003e\n\n      \u003cdt\u003erefresh(r)\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t  flush server log or cache.\n\t\u003c/p\u003e\n\n      \u003cdt\u003ereload()\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t  reload access privilege table.\n\t\u003c/p\u003e\n\n      \u003cdt\u003erollback()\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t  rollback transaction.\n\t\u003c/p\u003e\n\n      \u003cdt\u003eselect_db(db)\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t  select database.\n\t\u003c/p\u003e\n\n      \u003cdt\u003eset_server_option(opt)\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t  set option to server.\n\t  options is one of Mysql::OPTION_MULTI_STATEMENTS_ON, Mysql::OPTION_MULTI_STATEMENTS_OFF.\n\t\u003c/p\u003e\n\n      \u003cdt\u003eshutdown()\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t  shutdown server.\n\t\u003c/p\u003e\n\n      \u003cdt\u003essl_set(key=nil, cert=nil, ca=nil, capath=nil, cipher=nil)\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t  use SSL.\n\t\u003c/p\u003e\n\n      \u003cdt\u003estat()\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t  return server status.\n\t\u003c/p\u003e\n\n      \u003cdt\u003estmt_init()\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t  return Mysql::Stmt class object.\n\t\u003c/p\u003e\n\n      \u003cdt\u003estore_result()\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t  return Mysql::Result object.\n\t\u003c/p\u003e\n\n      \u003cdt\u003ethread_id()\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t  retrun thread id.\n\t\u003c/p\u003e\n\n      \u003cdt\u003euse_result()\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t  return Mysql::Result object.\n\t\u003c/p\u003e\n\n      \u003cdt\u003ewarning_count()\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t  return warning count last query.\n\t\u003c/p\u003e\n    \u003c/dl\u003e\n\n    \u003ch3\u003eOBJECT VARIABLES\u003c/h3\u003e\n\n    \u003cdl\u003e\n      \u003cdt\u003equery_with_result\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t  If true, query() also invokes store_result() and returns a\n\t  Mysql::Result object.  Default is true.\n\t\u003c/p\u003e\n\n      \u003cdt\u003ereconnect\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t  If true, reconnect to server automatically when disconect to server.\n\t  Default is false.\n\t\u003c/p\u003e\n\n    \u003c/dl\u003e\n\n    \u003ch2\u003eMysql::Result class\u003c/h2\u003e\n\n    \u003ch3\u003eOBJECT METHODS\u003c/h3\u003e\n    \u003cdl\u003e\n      \u003cdt\u003efree()\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t  free memory of result table.\n\t\u003c/p\u003e\n\n      \u003cdt\u003edata_seek(offset)\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t  seek row.\n\t\u003c/p\u003e\n\n      \u003cdt\u003efetch_field()\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t  return next Mysql::Field object.\n\t\u003c/p\u003e\n\n      \u003cdt\u003efetch_fields()\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t  return Array of Mysql::Field object.\n\t\u003c/p\u003e\n\n      \u003cdt\u003efetch_field_direct(fieldnr)\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t  return Mysql::Field object.\n\t\u003c/p\u003e\n\n      \u003cdt\u003efetch_lengths()\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t  return Array of field length.\n\t\u003c/p\u003e\n\n      \u003cdt\u003efetch_row()\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t  return row as Array.\n\t\u003c/p\u003e\n\n      \u003cdt\u003efetch_hash(with_table=false)\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t  return row as Hash.\n\t  If with_table is true, hash key format is \"tablename.fieldname\".\n\t\u003c/p\u003e\n\n      \u003cdt\u003efield_seek(offset)\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t  seek field.\n\t\u003c/p\u003e\n\n      \u003cdt\u003efield_tell()\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t  return field position.\n\t\u003c/p\u003e\n\n      \u003cdt\u003enum_fields()\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t  return number of fields.\n\t\u003c/p\u003e\n\n      \u003cdt\u003enum_rows()\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t  return number of rows.\n\t\u003c/p\u003e\n\n      \u003cdt\u003erow_seek(offset)\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t  seek row.\n\t\u003c/p\u003e\n\n      \u003cdt\u003erow_tell()\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t  return row position.\n\t\u003c/p\u003e\n    \u003c/dl\u003e\n\n    \u003ch3\u003eITERATOR\u003c/h3\u003e\n    \u003cdl\u003e\n      \u003cdt\u003eeach() {|x| ...}\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t  'x' is array of column values.\n\t\u003c/p\u003e\n\n      \u003cdt\u003eeach_hash(with_table=false) {|x| ...}\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t  'x' is hash of column values, and the keys are the column names.\n\t\u003c/p\u003e\n    \u003c/dl\u003e\n\n    \u003ch2\u003eMysql::Field class\u003c/h2\u003e\n\n    \u003ch3\u003eOBJECT VARIABLES(read only)\u003c/h3\u003e\n    \u003cdl\u003e\n      \u003cdt\u003ename\u003cdd\u003efield name\n      \u003cdt\u003etable\u003cdd\u003etable name\n      \u003cdt\u003edef\u003cdd\u003edefault value\n      \u003cdt\u003etype\u003cdd\u003efield type\n      \u003cdt\u003elength\u003cdd\u003efield length\n      \u003cdt\u003emax_length\u003cdd\u003emax field length\n      \u003cdt\u003eflags\u003cdd\u003efield flag\n      \u003cdt\u003edecimals\u003cdd\u003enumber of decimals\n    \u003c/dl\u003e\n\n    \u003ch3\u003eOBJECT METHODS\u003c/h3\u003e\n    \u003cdl\u003e\n      \u003cdt\u003ehash()\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t  return field as Hash.\n\t\u003c/p\u003e\n\t\u003cp\u003e\n\t  ex.) obj.name == obj.hash['name']\n\t\u003c/p\u003e\n\n      \u003cdt\u003eis_not_null?()\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t  True if this field is defined as NOT NULL.\n\t\u003c/p\u003e\n\n      \u003cdt\u003eis_num?()\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t  True if this field type is numeric.\n\t\u003c/p\u003e\n\n      \u003cdt\u003eis_pri_key?()\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t  True if this field is a primary key.\n\t\u003c/p\u003e\n\n      \u003cdt\u003einspect()\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t  return \"#\u0026lt;Mysql::Field:fieldname\u0026gt;\"\n\t\u003c/p\u003e\n    \u003c/dl\u003e\n\n    \u003ch2\u003eMysql::Stmt class\u003c/h2\u003e\n    \u003cp\u003e\n      Example:\n    \u003c/p\u003e\n    \u003cpre class=\"code\"\u003e\nmy = Mysql.new(hostname, username, password, databasename)\nst = my.prepare(\"insert into tblname (col1,col2,col3) values (?,?,?)\")\nst.execute(\"abc\",123,Time.now)\nst.prepare(\"select col1,col2,col3 from tblname\")\nst.execute\nst.fetch  # =\u003e [\"abc\", 123, #\u0026lt;Mysql::Time:2005-07-24 23:52:55\u0026gt;]\nst.close\n\u003c/pre\u003e\n\n    \u003ch3\u003eOBJECT METHODS\u003c/h3\u003e\n    \u003cdl\u003e\n      \u003cdt\u003eaffected_rows()\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t\u003c/p\u003e\n\n      \u003cdt\u003ebind_result(class, ...)\n      \u003cdd\u003e\n        \u003cp\u003e\n        \u003c/p\u003e\n\n      \u003cdt\u003eclose()\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t\u003c/p\u003e\n\n      \u003cdt\u003edata_seek(offset)\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t\u003c/p\u003e\n\n      \u003cdt\u003eexecute(arg, ...)\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t\u003c/p\u003e\n\n      \u003cdt\u003efetch()\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t\u003c/p\u003e\n\t\u003cp\u003e\n\t  Type mapping:\n\t\u003c/p\u003e\n\t\u003ctable\u003e\n\t    \u003ctr\u003e\u003cth\u003eMySQL type\u003cth\u003eRuby class\n\t    \u003ctr\u003e\u003ctd\u003eTINYINT, SMALLINT, MEDIUMINT, YEAR\u003ctd\u003eFixnum\n\t    \u003ctr\u003e\u003ctd\u003eINT, BIGINT\u003ctd\u003eFixnum or Bignum\n\t    \u003ctr\u003e\u003ctd\u003eFLOAT, DOUBLE\u003ctd\u003eFloat\n\t    \u003ctr\u003e\u003ctd\u003eDECIMAL\u003ctd\u003eString\n\t    \u003ctr\u003e\u003ctd\u003eDATE, DATETIME, TIMESTAMP, TIME\u003ctd\u003eMysql::Time\n\t    \u003ctr\u003e\u003ctd\u003eCHAR, VARCHAR, BINARY, VARBINARY, TINYBLOB, TINYTEXT, TINYBLOB, TINYTEXT, MEDIUMBLOB, MEDIUMTEXT, LONGBLOB, LONGTEXT, ENUM, SET, BIT\u003ctd\u003eString\n\t    \u003ctr\u003e\u003ctd\u003eNULL\u003ctd\u003eNilClass\n\t\u003c/table\u003e\n\n      \u003cdt\u003efield_count()\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t\u003c/p\u003e\n\n      \u003cdt\u003efree_result()\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t\u003c/p\u003e\n\n      \u003cdt\u003einsert_id()\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t\u003c/p\u003e\n\n      \u003cdt\u003enum_rows()\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t\u003c/p\u003e\n\n      \u003cdt\u003eparam_count()\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t\u003c/p\u003e\n\n      \u003cdt\u003eprepare(q)\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t\u003c/p\u003e\n\n      \u003cdt\u003eresult_metadata()\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t\u003c/p\u003e\n\n      \u003cdt\u003erow_seek(offset)\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t\u003c/p\u003e\n\n      \u003cdt\u003erow_tell()\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t\u003c/p\u003e\n\n      \u003cdt\u003esqlstate()\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t\u003c/p\u003e\n    \u003c/dl\u003e\n\n    \u003ch3\u003eITERATOR\u003c/h3\u003e\n    \u003cdl\u003e\n      \u003cdt\u003eeach() {|x| ...}\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t\u003c/p\u003e\n    \u003c/dl\u003e\n\n    \u003ch2\u003eMysql::Time class\u003c/h2\u003e\n    \u003cp\u003e\n    \u003c/p\u003e\n\n    \u003ch3\u003eCLASS METHODS\u003c/h3\u003e\n    \u003cdl\u003e\n      \u003cdt\u003enew(year=0,month=0,day=0,hour=0,minute=0,second=0,neg=false,second_part=0)\n      \u003cdd\u003e\n\t\u003cp\u003e\n\t\u003c/p\u003e\n    \u003c/dl\u003e\n\n    \u003ch3\u003eOBJECT VARIABLES\u003c/h3\u003e\n    \u003cdl\u003e\n      \u003cdt\u003eyear\n      \u003cdd\u003e\n\n      \u003cdt\u003emonth\n      \u003cdd\u003e\n\n      \u003cdt\u003eday\n      \u003cdd\u003e\n\n      \u003cdt\u003ehour\n      \u003cdd\u003e\n\n      \u003cdt\u003eminute\n      \u003cdd\u003e\n\n      \u003cdt\u003esecond\n      \u003cdd\u003e\n\n      \u003cdt\u003eneg\n      \u003cdd\u003e\n\n      \u003cdt\u003esecond_part\n      \u003cdd\u003e\n    \u003c/dl\u003e\n\n    \u003ch2\u003eMysql::Error class\u003c/h2\u003e\n\n    \u003ch3\u003eOBJECT VARIABLES(read only)\u003c/h3\u003e\n    \u003cdl\u003e\n      \u003cdt\u003eerror\n      \u003cdd\u003eeror message\n      \u003cdt\u003eerrno\n      \u003cdd\u003eerror number\n    \u003c/dl\u003e\n\n    \u003ch2\u003eHistory\u003c/h2\u003e\n    \u003cdl\u003e\n      \u003cdt\u003e2009-02-01\n      \u003cdd\u003e\n        version 2.8.1\u003cbr\u003e\n        \u003cul\u003e\n          \u003cli\u003ecorrespond to Ruby 1.9.1\n        \u003c/ul\u003e\n\n      \u003cdt\u003e2008-09-29\n      \u003cdd\u003e\n        version 2.8\u003cbr\u003e\n        version 2.7.7\n        \u003cul\u003e\n          \u003cli\u003eWhen connecting to MySQL, EINTR is occurred sometimes ([ruby-dev:31842])\n          \u003cli\u003eMySQL/Ruby 2.7.* can not be compiled on Ruby 1.8.5.\n        \u003c/ul\u003e\n\n      \u003cdt\u003e2008-06-20\n      \u003cdd\u003e\n        version 2.8pre4\u003cbr\u003e\n        \u003cul\u003e\n          \u003cli\u003e[ruby-dev:35152]\n        \u003c/ul\u003e\n\n      \u003cdt\u003e2008-06-17\n      \u003cdd\u003e\n        version 2.8pre3\u003cbr\u003e\n        version 2.7.6\n        \u003cul\u003e\n          \u003cli\u003eOn 64bit machine, Mysql::Stmt#execute raise error on large numeric value(\u003e= 2**30).\n        \u003c/ul\u003e\n\n      \u003cdt\u003e2008-03-08\n      \u003cdd\u003e\n        version 2.8pre2\u003cbr\u003e\n        version 2.7.5\n        \u003cul\u003e\n          \u003cli\u003eOn 64bit machine, Mysql::Stmt#fetch return invalid numeric value.\n        \u003c/ul\u003e\n\n      \u003cdt\u003e2007-12-26\n      \u003cdd\u003e\n        version 2.8pre1\n        \u003cul\u003e\n          \u003cli\u003efor Ruby 1.9.0\n          \u003cli\u003eIncompat: Mysql::Result#each_hash don't create column name string each row. it's shared.\n          \u003cli\u003eIncompat: Mysql#query with block no longer turn on multi-statements mode automatically.\n        \u003c/ul\u003e\n\n      \u003cdt\u003e2007-08-22\n      \u003cdd\u003e\n        version 2.7.4\n        \u003cul\u003e\n          \u003cli\u003eBUG: Mysql::Stmt#execute memory leak.\n        \u003c/ul\u003e\n\n      \u003cdt\u003e2006-12-20\n      \u003cdd\u003e\n        version 2.7.3\n        \u003cul\u003e\n          \u003cli\u003eBUG: Mysql#query with block is stopped when last query failed.\n        \u003c/ul\u003e\n\n      \u003cdt\u003e2006-10-28\n      \u003cdd\u003e\n        version 2.7.2\n        \u003cul\u003e\n          \u003cli\u003eBUG: Mysql::Stmt#result_metadata don't return nil. (Thanks to Hidetoshi)\n          \u003cli\u003eBUG: Mysql#close check mysql_errno.\n          \u003cli\u003eBUG: multistatement Mysql#query with block ignore error.\n          \u003cli\u003eextconf.rb for Visual C++. (Thanks to Shugo Maeda)\n          \u003cli\u003esupport MySQL BIT type.\n          \u003cli\u003eadd Mysql::Field::TYPE_BIT, TYPE_NEWDECIMAL.\n        \u003c/ul\u003e\n\n      \u003cdt\u003e2006-06-04\n      \u003cdd\u003e\n        version  2.7.1\n        \u003cul\u003e\n          \u003cli\u003echange free() to xfree(). To avoid crash on Windows. (Thanks Tobias Grimm)\n        \u003c/ul\u003e\n\n      \u003cdt\u003e2005-08-22\n      \u003cdd\u003e\n        version 2.7\n        \u003cul\u003e\n          \u003cli\u003eadd constants for Mysql#options: Mysql::OPT_GUESS_CONNECTION, Mysql::OPT_USE_EMBEDDED_CONNECTION, Mysql::OPT_USE_REMOTE_CONNECTION, Mysql::SET_CLIENT_IP\n          \u003cli\u003etest.rb: for 4.0.x, 5.0.x\n        \u003c/ul\u003e\n\n      \u003cdt\u003e2005-08-16\n      \u003cdd\u003e\n        version 2.7-beta3\n        \u003cul\u003e\n          \u003cli\u003eadd Mysql::Stmt#bind_result\n        \u003c/ul\u003e\n\n      \u003cdt\u003e2005-08-02\n      \u003cdd\u003e\n\tversion 2.7-beta2\n\t\u003cul\u003e\n\t  \u003cli\u003eBUG: mysql.c.in: fetch_hash: nil value doesn't exist in hash. (Thanks Stefan Kaes)\n\t  \u003cli\u003eadd constant Mysql::VERSION.\n\t  \u003cli\u003eadd Mysql#prepare\n\t\u003c/ul\u003e\n\n      \u003cdt\u003e2005-07-24\n      \u003cdd\u003e\n\tversion 2.7-beta\n\t\u003cul\u003e\n\t  \u003cli\u003eadd Mysql#stmt_init method\n\t  \u003cli\u003eadd Mysql::Stmt, Mysql::Time, Mysql::RowOffset class\n\t  \u003cli\u003eadd Mysql::Error#sqlstate method\n\t  \u003cli\u003echange offset value to Mysql::RowOffset object that is used by Mysql::Result#row_seek,row_tell\n\t\u003c/ul\u003e\n\n      \u003cdt\u003e2005-07-31\n      \u003cdd\u003e\n\tversion 2.6.3\n\t\u003cul\u003e\n\t  \u003cli\u003eadd constant Mysql::VERSION.\n\t\u003c/ul\u003e\n\n      \u003cdt\u003e2005-07-26\n      \u003cdd\u003e\n\tversion 2.6.2\n\t\u003cul\u003e\n\t  \u003cli\u003eBUG: mysql.c.in: fetch_hash: nil value doesn't exist in hash. (Thanks Stefan Kaes)\n\t\u003c/ul\u003e\n\n      \u003cdt\u003e2005-06-28\n      \u003cdd\u003e\n\tversion 2.6.1\n\t\u003cul\u003e\n\t  \u003cli\u003emysql.c.in: fix to compile error on MacOSX.\n\t\u003c/ul\u003e\n\n      \u003cdt\u003e2005-04-25\n      \u003cdd\u003e\n\tversion 2.6\n\t\u003cul\u003e\n\t  \u003cli\u003eadd constants for Mysql#option():\n\t    Mysql::OPT_PROTOCOL, Mysql::OPT_READ_TIMEOUT,\n\t    Mysql::OPT_WRITE_TIMEOUT, Mysql::SET_CHARSET_DIR,\n\t    Mysql::SET_CHARSET_NAME, Mysql::SHARED_MEMORY_BASE_NAME,\n\t    Mysql::SECURE_AUTH\n\t  \u003cli\u003eadd methods: Mysql#more_results?(), Mysql#next_result(), \n\t    Mysql#set_server_option(), Mysql#sqlstate()\n\t  \u003cli\u003eadd constants for Mysql#connect():\n\t    Mysql::CLIENT_MULTI_STATEMENTS, Mysql::CLIENT_MULTI_RESULTS\n\t  \u003cli\u003eadd constants for Mysql#set_server_option():\n\t    Mysql::OPTION_MULTI_STATEMENTS_ON,\n\t    Mysql::OPTION_MULTI_STATEMENTS_OFF\n\t  \u003cli\u003eadd Mysql#query() with block\n\t  \u003cli\u003eadd Mysql#reconnect(), Mysql#reconnect=()\n\t  \u003cli\u003eWhen connection was closed, it don't try to reconnect by default.\n\t\u003c/ul\u003e\n\n      \u003cdt\u003e2005-02-12\n      \u003cdd\u003e\n\tversion 2.5.2\n\t\u003cul\u003e\n\t  \u003cli\u003eBUG: Mysql#connect make object to not close. (Thanks Andres Salomon)\n\t\u003c/ul\u003e\n\n      \u003cdt\u003e2004-09-20\n      \u003cdd\u003e\n\tversion 2.5.1\n\t\u003cul\u003e\n\t  \u003cli\u003eadd Mysql#set_ssl().\n\t\u003c/ul\u003e\n\n      \u003cdt\u003e2004-08-31\n      \u003cdd\u003e\n\tversion 2.5\n\t\u003cul\u003e\n\t  \u003cli\u003ecorrespond to MySQL 4.1.x.\n\t  \u003cli\u003echange MysqlRes, MysqlField, MysqlError to Mysql::Result, Mysql::Field, Mysql::Error.\n\t  \u003cli\u003eadd Mysql.client_version(), Mysql.get_client_version(),\n\t    Mysql#client_version(), Mysql#get_client_version(),\n\t    Mysql#server_version(), Mysql#get_server_version(),\n\t    Mysql#warning_count(), Mysql#commit(), Mysql#rollback(),\n\t    Mysql#autocommit().\n\t  \u003cli\u003eadd Mysql::Field#is_not_null?(), Mysql::Field#is_pri_key?(),\n\t    Mysql::Field#is_num?().\n\t  \u003cli\u003eadd MysqlField::TYPE_VAR_STRING.\n\t\u003c/ul\u003e\n\n      \u003cdt\u003e2003-08-10\n      \u003cdd\u003e\n\tversion 2.4.5\n\t\u003cul\u003e\n\t  \u003cli\u003eextconf.rb: correspond to MySQL 4.1.\n\t  \u003cli\u003emysql.c.in: correspond to Ruby 1.8.\n\t\u003c/ul\u003e\n\n      \u003cdt\u003e2003-02-23\n      \u003cdd\u003e\n\tversion 2.4.4a\n\t\u003cul\u003e\n\t  \u003cli\u003emake extconf.rb to correspond to Ruby 1.8.0\n\t\u003c/ul\u003e\n\n      \u003cdt\u003e2003-01-29\n      \u003cdd\u003e\n\tversion 2.4.4\n\t\u003cul\u003e\n\t  \u003cli\u003eadd Mysql::OPT_LOCAL_INFILE.\n\t  \u003cli\u003eadd --with-mysql-config option to extconf.rb.\n\t  \u003cli\u003eextconf.rb automatically detect typical library.\n\t\u003c/ul\u003e\n\n      \u003cdt\u003e2003-01-05\n      \u003cdd\u003e\n\tversion 2.4.3c\n\t\u003cul\u003e\n\t  \u003cli\u003emodified English README. Thanks to Paul DuBois.\n\t\u003c/ul\u003e\n\n      \u003cdt\u003e2002-12-24\n      \u003cdd\u003e\n\tversion 2.4.3b\n\t\u003cul\u003e\n\t  \u003cli\u003emake extconf.rb to correspond to Ruby 1.6.8.\n\t\u003c/ul\u003e\n\n      \u003cdt\u003e2002-11-07\n      \u003cdd\u003e\n\tversion 2.4.3a\n\t\u003cul\u003e\n\t  \u003cli\u003efix bug duplicating constant.\n\t\u003c/ul\u003e\n\n      \u003cdt\u003e2002-09-10\n      \u003cdd\u003e\n\tversion 2.4.3\n\t\u003cul\u003e\n\t  \u003cli\u003efor error number with prefix ER_ .\n\t  \u003cli\u003eget error constant from errmsg.h and mysqld_error.h automatically.\n\t\u003c/ul\u003e\n\n      \u003cdt\u003e2002-01-07\n      \u003cdd\u003e\n\tversion 2.4.2\n\t\u003cul\u003e\n\t  \u003cli\u003efor MySQL 4.0.\n\t  \u003cli\u003echange `uint' to `unsigned int' (for mswin).\n\t\u003c/ul\u003e\n\n      \u003cdt\u003e2001-12-02\n      \u003cdd\u003e\n\tversion 2.4.1\n\t\u003cul\u003e\n\t  \u003cli\u003eremove `extern' (for Cygiwn).\n\t  \u003cli\u003echange option of extconf.rb.\n\t\u003c/ul\u003e\n\n      \u003cdt\u003e2001-10-12\n      \u003cdd\u003e\n\tversion 2.4.0\n\t\u003cul\u003e\n\t  \u003cli\u003efor Ruby 1.7.\n\t  \u003cli\u003eadd Mysql::debug(), Mysql#change_user(), Mysql#character_set_name(), Mysql#dump_debug_info().\n\t\u003c/ul\u003e\n    \u003c/dl\u003e\n\n    \u003ch2\u003eAuthor\u003c/h2\u003e\n    \u003cp\u003e\n      e-mail: TOMITA Masahiro \u003ca href=\"mailto:tommy@tmtm.org\"\u003etommy@tmtm.org\u003c/a\u003e\n      \u003ca href=\"http://tmtm.org\"\u003ehttp://tmtm.org\u003c/a\u003e\n    \u003c/p\u003e\n    \u003chr\u003e\n    \u003caddress\u003e\u003ca href=\"mailto:tommy@tmtm.org\"\u003eTOMITA Masahiro\u003c/a\u003e\u003c/address\u003e\n\u003c!-- Created: Sun Aug 29 11:52:09 JST 2004 --\u003e\n\u003c!-- hhmts start --\u003e\nLast modified: Sun Feb  1 17:40:49 JST 2009\n\u003c!-- hhmts end --\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felia%2Fmysql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felia%2Fmysql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felia%2Fmysql/lists"}