class MySQL::Connection

Overview

MySQL connection class. Allows high-level interaction with mysql through LibMySQL.

NOTE The @handle is totally not threadsafe, because it is stateful. So if concurrency is needed, then each concurrent task should own its own connection.

Defined in:

mysql/connection.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new #

[View source]

Instance Method Detail

def client_info #

[View source]
def close #

[View source]
def commit_transaction #

[View source]
def connect(host, user, pass, db, port, socket, flags = 0_u32) #

[View source]
def error #

[View source]
def insert_id #

[View source]
def query(query_string) #

@non-threadsafe!


[View source]
def rollback_transaction #

[View source]
def set_option(option : LibMySQL::MySQLOption, value : String) #

[View source]
def set_option(option : LibMySQL::MySQLOption, value : Bool) #

[View source]
def set_option(option : LibMySQL::MySQLOption, value) #

[View source]
def start_transaction #

[View source]
def transaction(&) #

[View source]