Module: Mysql::C

Extended by:
FFI::Library
Defined in:
lib/ffi-mysql/mysql.rb

Overview

FFI interface.

Defined Under Namespace

Classes: Bind, Field, Time

Constant Summary collapse

FieldType =

FieldType = enum(:decimal, Mysql::Field::TYPE_DECIMAL,

:tiny,        Mysql::Field::TYPE_TINY,
:short,       Mysql::Field::TYPE_SHORT,
:long,        Mysql::Field::TYPE_LONG,
:float,       Mysql::Field::TYPE_FLOAT,
:double,      Mysql::Field::TYPE_DOUBLE,
:null,        Mysql::Field::TYPE_NULL,
:timestamp,   Mysql::Field::TYPE_TIMESTAMP,
:longlong,    Mysql::Field::TYPE_LONGLONG,
:int24,       Mysql::Field::TYPE_INT24,
:date,        Mysql::Field::TYPE_DATE,
:time,        Mysql::Field::TYPE_TIME,
:datetime,    Mysql::Field::TYPE_DATETIME,
:year,        Mysql::Field::TYPE_YEAR,
:newdate,     Mysql::Field::TYPE_NEWDATE,
:varchar,     Mysql::Field::TYPE_VARCHAR,
:bit,         Mysql::Field::TYPE_BIT,
:newdecimal,  Mysql::Field::TYPE_NEWDECIMAL,
:enum,        Mysql::Field::TYPE_ENUM,
:set,         Mysql::Field::TYPE_SET,
:tiny_blob,   Mysql::Field::TYPE_TINY_BLOB,
:medium_blob, Mysql::Field::TYPE_MEDIUM_BLOB,
:long_blob,   Mysql::Field::TYPE_LONG_BLOB,
:blob,        Mysql::Field::TYPE_BLOB,
:var_string,  Mysql::Field::TYPE_VAR_STRING,
:string,      Mysql::Field::TYPE_STRING,
:geometry,    Mysql::Field::TYPE_GEOMETRY,
:char,        Mysql::Field::TYPE_CHAR,
:interval,    Mysql::Field::TYPE_INTERVAL)
:uchar
StmtAttrType =
enum( :update_max_length, :cursor_type, :prefetch_rows )

Class Method Summary collapse

Class Method Details

.maybe_attach_function(name, *args) ⇒ Object



71
72
73
74
75
76
77
78
79
80
81
82
83
# File 'lib/ffi-mysql/mysql.rb', line 71

def self.maybe_attach_function name, *args
    attach_function name, *args
rescue FFI::NotFoundError => e
 c = class << self; self; end
 c.class_eval do
  define_method(name) {|*a| raise e}
 end
rescue => e
 c = class << self; self; end
 c.class_eval do
  define_method(name) {|*a| raise e}
 end
end