georgepalmer-couch_foo 0.7.9 → 0.7.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. data/README.rdoc +26 -0
  2. data/VERSION.yml +1 -1
  3. data/lib/couch_foo/base.rb +2 -2
  4. metadata +2 -2
data/README.rdoc CHANGED
@@ -1,5 +1,31 @@
1
1
  = CouchFoo
2
2
 
3
+ == Introduction
4
+
5
+ CouchDB (http://couchdb.apache.org/) works slightly differently to relational databases. First,
6
+ and foremost, it is a document-orientated database. That is, data is stored in documents each
7
+ of which have a unique id that is used to access and modify it. The contents of the documents
8
+ are free from structure (or schema free) and bare no relation to one another (unless you encode
9
+ that within the documents themselves). So in many ways documents are like records within a
10
+ relational database except there are no tables to keep documents of the same type in.
11
+
12
+ CouchDB interfaces with the external world via a RESTful interface. This allows document
13
+ creation, updating, deletion etc. The contents of a document are specified in JSON so its
14
+ possible to serialise objects within the database record efficiently as well as store all the
15
+ normal types natively.
16
+
17
+ As a consequence of its free form structure there is no SQL to query the database. Instead you
18
+ define (table-oriented) views that emit certain bits of data from the record and apply
19
+ conditions, sorting etc to those views. For example if you were to emit the colour attribute
20
+ you could find all documents with a certain colour. This is similar to indexed lookups on a
21
+ relational table (both in terms of concept and performance).
22
+
23
+ CouchDB has been designed from the ground up to operate in a distributed way. It provides
24
+ robust, incremental replication with bi-directional conflict detection and resolution. It's an
25
+ excellent choice for unstructed data, large datasets that need sharding efficiently and situations
26
+ where you wish to run local copies of the database.
27
+
28
+
3
29
  == Overview
4
30
 
5
31
  CouchFoo provides an ActiveRecord styled interface to CouchDB. The external API is nearly identical
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :major: 0
3
3
  :minor: 7
4
- :patch: 9
4
+ :patch: 10
@@ -70,7 +70,7 @@ module CouchFoo
70
70
  #
71
71
  # CouchDB interfaces with the external world via a RESTful interface. This allows document
72
72
  # creation, updating, deletion etc. The contents of a document are specified in JSON so its
73
- # possible to serialise objects with the database record efficiently as well as store all the
73
+ # possible to serialise objects within the database record efficiently as well as store all the
74
74
  # normal types natively.
75
75
  #
76
76
  # As a consequence of its free form structure there is no SQL to query the database. Instead you
@@ -1699,7 +1699,7 @@ module CouchFoo
1699
1699
  attrs = clone_attributes(:read_attribute_before_type_cast)
1700
1700
  attributes_protected_by_default.each {|a| attrs.delete(a)}
1701
1701
  record = self.class.new
1702
- record.attributes = attrs, false
1702
+ record.send :instance_variable_set, '@attributes', attrs
1703
1703
  record
1704
1704
  end
1705
1705
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: georgepalmer-couch_foo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.9
4
+ version: 0.7.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - George Palmer
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-02-10 00:00:00 -08:00
12
+ date: 2009-02-11 00:00:00 -08:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency