mysql2 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +3 -0
- data/README.rdoc +13 -0
- data/VERSION +1 -1
- data/lib/active_record/connection_adapters/mysql2_adapter.rb +4 -1
- data/lib/mysql2.rb +1 -1
- data/mysql2.gemspec +2 -2
- metadata +3 -3
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 0.1.7 (May 22nd, 2010)
|
4
|
+
* fix a bug when using the disconnect! method on a closed connection in the AR driver
|
5
|
+
|
3
6
|
## 0.1.6 (May 14th, 2010)
|
4
7
|
* more fixes to the AR adapter related to casting
|
5
8
|
* add missing index creation override method to AR adapter
|
data/README.rdoc
CHANGED
@@ -101,6 +101,19 @@ while specifying callbacks for success for failure. Here's a simple example:
|
|
101
101
|
end
|
102
102
|
end
|
103
103
|
|
104
|
+
== Lazy Everything
|
105
|
+
|
106
|
+
Well... almost ;)
|
107
|
+
|
108
|
+
Field name strings/symbols are shared across all the rows so only one object is ever created to represent the field name for an entire dataset.
|
109
|
+
|
110
|
+
Rows themselves are lazily created in ruby-land when an attempt to yield it is made via #each.
|
111
|
+
For example, if you were to yield 4 rows from a 100 row dataset, only 4 hashes will be created. The rest will sit and wait in C-land until you want them (or when the GC goes to cleanup your Mysql2::Result instance).
|
112
|
+
Now say you were to iterate over that same collection again, this time yielding 15 rows - the 4 previous rows that had already been turned into ruby hashes would be pulled from an internal cache, then 11 more would be created and stored in that cache.
|
113
|
+
Once the entire dataset has been converted into ruby objects, Mysql2::Result will free the Mysql C result object as it's no longer needed.
|
114
|
+
|
115
|
+
As for field values themselves, I'm workin on it - but expect that soon.
|
116
|
+
|
104
117
|
== Compatibility
|
105
118
|
|
106
119
|
The specs pass on my system (SL 10.6.3, x86_64) in these rubies:
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.7
|
data/lib/mysql2.rb
CHANGED
data/mysql2.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{mysql2}
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.7"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Brian Lopez"]
|
12
|
-
s.date = %q{2010-05-
|
12
|
+
s.date = %q{2010-05-22}
|
13
13
|
s.email = %q{seniorlopez@gmail.com}
|
14
14
|
s.extensions = ["ext/extconf.rb"]
|
15
15
|
s.extra_rdoc_files = [
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
version: 0.1.
|
8
|
+
- 7
|
9
|
+
version: 0.1.7
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Brian Lopez
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-05-
|
17
|
+
date: 2010-05-22 00:00:00 -07:00
|
18
18
|
default_executable:
|
19
19
|
dependencies: []
|
20
20
|
|