swiss_db 0.6.1 → 0.6.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +28 -3
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b4493439407074a5f0f206937592af34b266bf4f
4
- data.tar.gz: d4194cddea16159f767e06affdf26a54a179ef03
3
+ metadata.gz: 12a348c1a9f77c807d7eade7e06002a95e4c1f48
4
+ data.tar.gz: 0da154167e4de32cd6bfa465b8a4f3f7a9d148d1
5
5
  SHA512:
6
- metadata.gz: 575b7f2dc6ab2517b08392e8d86901d7699c11d2d552bedffc95e5f4ff810f550c372171a164276ae5163939e3cb07a353d7423babf19f2445bfbe5e7cd62910
7
- data.tar.gz: c42394a1d37094fb2286090e0afa8bf8eb766b242837771e860a12ca950394b5bd10368c78ca9d7642394f5cc88c321f038977e2acb35ed1d2cad0f53ee81e0b
6
+ metadata.gz: 8eb8ca6741ec915d891ad7490aa4813ea2ef01dc05c35b9a7b3ccc87e7333dde41f7cf3bf54aed6acbe25addbb0189329efeed23c3fe0bc50810a7ab32be66ec
7
+ data.tar.gz: bb7f0729d5928c068f918ec9fe82c84c7f9bd5487b6919cd0fb2eb35339cbf0139da33a86b6ce9a5aba7a20f3a7e97fc833265a08a5499b10f011a2d6a153305
data/README.md CHANGED
@@ -20,11 +20,13 @@ Or install it yourself as:
20
20
 
21
21
  ## Usage
22
22
 
23
+ # Schemas
24
+
23
25
  Schemas are the exact same from CoreDataQuery and go in the same place. (schemas/)
24
26
 
25
27
  Schema name does nothing.
26
28
 
27
- ```
29
+ # Models
28
30
 
29
31
  Models are as such:
30
32
 
@@ -37,6 +39,8 @@ class Model < SwissModel
37
39
  end
38
40
  ```
39
41
 
42
+ # Set the context
43
+
40
44
  Set the context in your bluepotion_application.rb.
41
45
 
42
46
  ```ruby
@@ -50,7 +54,28 @@ class BluePotionApplication < PMApplication
50
54
  end
51
55
  ```
52
56
 
53
- That's it! #all, #last, #first, #count, #save, #update_attributes and the usual are now available!
57
+ # Examples
58
+
59
+ ```ruby
60
+ Model.first.name
61
+ Model.all.last.name
62
+ Model.all.count
63
+ m = Model.first
64
+ m.name = "Sam"
65
+ m.save # will persist the data
66
+ m.update_attribute("name", "chucky")
67
+ ```
68
+
69
+
70
+ That's it! #all, #last, #first, #count, #save, #update_attribute and the usual are now available!
71
+
72
+ # Planned
73
+
74
+ #update_attributes support
75
+
76
+ #destroy just one object support
77
+
78
+ detect class names of models for tableize
54
79
 
55
80
  KNOWN LIMITATION: This ORM compiles in the database name and the database version as a constant. Unfortunately I don't know of a way around this yet. This means no DB migrations yet by doing the simple version bump that is supported by Android. If we get a way to configure these from outside the gem, it will open up possibilities such as multiple schemas and migrations. To get around this simply delete your local database when you need to migrate. You can delete the app from the simulator/device (probably) or use my convenience command:
56
81
 
@@ -66,7 +91,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
66
91
 
67
92
  ## Contributing
68
93
 
69
- Bug reports and pull requests are welcome on GitHub at https://github.com/jsilverMDX/swiss_db.
94
+ Bug reports and pull requests are welcome on GitHub at https://github.com/jsilverMDX/swissDB.
70
95
 
71
96
 
72
97
  ## License
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: swiss_db
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Silverman