Permalink
Browse files

EM.attach is bundled with >= 0.12.2; Blurb about sequel/async

  • Loading branch information...
1 parent 9f4d302 commit f79ac4a56dcfbb27f5f14db2d4e1929b78d37c29 @tmm1 tmm1 committed Jun 29, 2009
Showing with 14 additions and 2 deletions.
  1. +14 −2 README
View
16 README
@@ -2,7 +2,7 @@ Async MySQL driver for Ruby/EventMachine
(c) 2008 Aman Gupta (tmm1)
-Requires mysqlplus and the EM.attach patch.
+Requires mysqlplus.
require 'em/mysql'
@@ -25,4 +25,16 @@ Requires mysqlplus and the EM.attach patch.
SQL('select sleep(0.25)'){ p 'done' }
SQL('select sleep(0.25)'){ p 'done' }
SQL('select sleep(0.25)'){ p 'done' }
- SQL('select sleep(0.25)'){ p 'done' }
+ SQL('select sleep(0.25)'){ p 'done' }
+
+Also includes a sequel async wrapper
+
+ require 'sequel'
+ require 'sequel/async'
+
+ DB = Sequel.connect(:adapter => 'mysql', :user => 'root', :database => 'test', ...)
+ EventedMysql.settings.update(..., :on_error => proc{|e| log 'error', e })
+
+ DB[:table].where(:field => 'value').async_update(:field => 'new value')
+
+For more info, see the comments in lib/sequel/async.rb

0 comments on commit f79ac4a

Please sign in to comment.