mysqlplus 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,24 @@
1
+ require 'rubygems'
2
+ require 'sequel'
3
+
4
+ require 'mysqlplus'
5
+ class Mysql
6
+ unless method_defined? :sync_query
7
+ alias :sync_query :query
8
+ alias :query :async_query
9
+ end
10
+ end
11
+
12
+ DB = Sequel.connect('mysql://root@localhost', :max_connections => 20)
13
+
14
+ start = Time.now
15
+
16
+ (0..10).map do
17
+ Thread.new do
18
+
19
+ p DB['select sleep(2)'].all
20
+
21
+ end
22
+ end.map{|t| t.join }
23
+
24
+ p (Time.now - start)
metadata ADDED
@@ -0,0 +1,70 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: mysqlplus
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.1
5
+ platform: ruby
6
+ authors:
7
+ - Muhammad A. Ali
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2009-03-22 00:00:00 -07:00
13
+ default_executable:
14
+ dependencies: []
15
+
16
+ description: Enhanced Ruby MySQL driver
17
+ email: oldmoe@gmail.com
18
+ executables: []
19
+
20
+ extensions:
21
+ - ext/extconf.rb
22
+ extra_rdoc_files:
23
+ - README
24
+ files:
25
+ - README
26
+ - Rakefile
27
+ - TODO_LIST
28
+ - ext/error_const.h
29
+ - ext/extconf.rb
30
+ - ext/mysql.c
31
+ - lib/mysqlplus.rb
32
+ - mysqlplus.gemspec
33
+ - test/c_threaded_test.rb
34
+ - test/evented_test.rb
35
+ - test/native_threaded_test.rb
36
+ - test/test_all_hashes.rb
37
+ - test/test_failure.rb
38
+ - test/test_helper.rb
39
+ - test/test_many_requests.rb
40
+ - test/test_parsing_while_response_is_being_read.rb
41
+ - test/test_threaded_sequel.rb
42
+ has_rdoc: true
43
+ homepage: http://github.com/oldmoe/mysqlplus
44
+ post_install_message:
45
+ rdoc_options:
46
+ - --main
47
+ - README
48
+ require_paths:
49
+ - lib
50
+ required_ruby_version: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: "0"
55
+ version:
56
+ required_rubygems_version: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ version: "0"
61
+ version:
62
+ requirements: []
63
+
64
+ rubyforge_project:
65
+ rubygems_version: 1.3.1
66
+ signing_key:
67
+ specification_version: 2
68
+ summary: Enhanced Ruby MySQL driver
69
+ test_files: []
70
+