activeuuid 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.mkd +11 -2
- data/lib/activeuuid/uuid.rb +10 -0
- data/lib/activeuuid/version.rb +1 -1
- metadata +3 -3
data/README.mkd
CHANGED
@@ -89,15 +89,16 @@ application the keys are represented by a UUIDTools::UUID object.
|
|
89
89
|
|
90
90
|
## Benefits of UUIDs as primary key
|
91
91
|
|
92
|
-
*
|
92
|
+
* no id conflict during multi-master write
|
93
93
|
* no locking due to auto-increment
|
94
94
|
* with time-based UUIDs you can store a timestamp within your UUID
|
95
|
-
* you can create natural keys
|
95
|
+
* you can create natural keys (based on the SHA of model attributes)
|
96
96
|
|
97
97
|
## Future work
|
98
98
|
* more transparent support for natural and composite keys
|
99
99
|
* support for MySQLs `INSERT ... ON DUPLICATE KEY UPDATE` syntax
|
100
100
|
* support a primary column name other than `id`
|
101
|
+
* work on other databases (Postgres, etc)
|
101
102
|
* tests
|
102
103
|
|
103
104
|
## Inspiration
|
@@ -105,6 +106,14 @@ James Golick's `friendly` is a great gem for NoSQL on MySQL. It's
|
|
105
106
|
a great gateway drug to systems like Cassandra for teams that are
|
106
107
|
already familiar with the ins-and-outs of MySQL.
|
107
108
|
|
109
|
+
## Installation
|
110
|
+
|
111
|
+
Add this to your `Gemfile`
|
112
|
+
|
113
|
+
gem "activeuuid"
|
114
|
+
|
115
|
+
Or get the code here: https://github.com/jashmenn/activeuuid
|
116
|
+
|
108
117
|
## References
|
109
118
|
* [1] http://bret.appspot.com/entry/how-friendfeed-uses-mysql
|
110
119
|
* [2] http://kekoav.com/blog/36-computers/58-uuids-as-primary-keys-in-mysql.html
|
data/lib/activeuuid/uuid.rb
CHANGED
data/lib/activeuuid/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activeuuid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2011-08-29 00:00:00.000000000Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: uuidtools
|
16
|
-
requirement: &
|
16
|
+
requirement: &2153469320 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *2153469320
|
25
25
|
description: Add's binary (not string) UUIDs to ActiveRecord in MySQL
|
26
26
|
email:
|
27
27
|
- nate@natemurray.com
|