public
Description: Trivial async MySQL driver for Ruby EventMachine
Homepage:
Clone URL: git://github.com/tqbf/asymy.git
asymy / prepared_statement.rb
100644 16 lines (12 sloc) 0.336 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
require File.dirname(__FILE__) + '/asymy'
 
module Asymy
 
    class PreparedStatement
        def initialize(opts={})
            @bp = opts[:backpointer]
            @handle = opts[:handle]
        end
 
        def exec(*args, &block)
            @bp.execute_prepared(args) {|cols, rows| block.call(cals, rows)}
        end
    end
end