skyward-orm 0.4.1 → 0.4.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 368cc314051a89b35aff6d635099bd278665c6408ccdce94aacdd15537664249
4
- data.tar.gz: e6eb1ae6d38db536708123fa344e7a2f6218da4673fe7b59c5091bb195a8120d
3
+ metadata.gz: 30728b618b923c91d52bea989ff08d062f96f42bb4b9801189aace95f51e9eb9
4
+ data.tar.gz: b3a0b559b262ca8f251d768919773417f1bf54702a67576575006fa2b9898706
5
5
  SHA512:
6
- metadata.gz: 590173a10d3b00085ba2bf9055153b66a44c15a213778ac78799bc5f80e8fa01393871511d9e66a3b4be52b3663972348151a5b893d9a390553d2052c5ea9dea
7
- data.tar.gz: ed2524b4735ba877e96c65de03c420fcaeba8d6e57eb2723ef302bb7f13b02ce4a9541a9cd2cc7506f6ac38da6c6a48afc058fc05506a60ba240c6b4776319d9
6
+ metadata.gz: 15e2e57c1074cf716dc2553d8d13be6ae0251df7004663d221611765ea33fc0e44bd145e6b3a1ef522a28391fa159de2784c63494f0b31590a0de326cf2489d0
7
+ data.tar.gz: 847b2103f06b2fae962b09ffbeffadca70c5c9ad71d4606d4cf89c67e264238c51b0d1afc09069ea5b333e0b328006e34087710f88bbf5611854b94d9aee738c
data/README.md CHANGED
@@ -526,10 +526,10 @@ Values are always bound as parameters, never interpolated. If you leave out the
526
526
  A write returns how many rows it changed, unless you ask for rows with `into`. [Drizzle](https://orm.drizzle.team) is the model: a write gives nothing back unless you ask, so it never reads more than you use.
527
527
 
528
528
  ```ruby
529
- Todo.insert(title: 'Buy milk', list_id: 1) # => 1
530
- Todo.insert_all([{ title: 'Eggs', list_id: 1 }, ...]) # => Integer, the rows inserted
531
- Todo.where(id: 42).update(done: true) # => Integer, the rows updated
532
- Todo.where(done: true).delete # => Integer, the rows deleted
529
+ Todo.insert(title: 'Buy milk', list_id: 1) # => 1
530
+ Todo.insert_all([{ title: 'Eggs', list_id: 1 }, { title: 'Bread', list_id: 1 }]) # => Integer, the rows inserted
531
+ Todo.where(id: 42).update(done: true) # => Integer, the rows updated
532
+ Todo.where(done: true).delete # => Integer, the rows deleted
533
533
  ```
534
534
 
535
535
  `into` names the rows to return instead, through `RETURNING` of just its members' columns, or every column for the table class itself. It can come anywhere before the write. `insert` returns its one row, and `insert_all`, `update` and `delete` return an `Array`:
@@ -537,11 +537,11 @@ Todo.where(done: true).delete # => Integer, the rows d
537
537
  ```ruby
538
538
  Id = Data.define(:id)
539
539
 
540
- Todo.into(Todo).insert(title: 'Buy milk', list_id: 1) # => Todo, every column
541
- Todo.into(Id).insert(title: 'Buy milk', list_id: 1) # => Id, RETURNING "id"
542
- Todo.into(Id).insert_all([{ title: 'Eggs', list_id: 1 }, ...]) # => Array[Id], the inserted rows' ids
543
- Todo.where(id: 42).into(Todo).update(done: true) # => Array[Todo], the updated rows
544
- Todo.where(done: true).into(Id).delete # => Array[Id], the deleted rows' ids
540
+ Todo.into(Todo).insert(title: 'Buy milk', list_id: 1) # => Todo, every column
541
+ Todo.into(Id).insert(title: 'Buy milk', list_id: 1) # => Id, RETURNING "id"
542
+ Todo.into(Id).insert_all([{ title: 'Eggs', list_id: 1 }, { title: 'Bread', list_id: 1 }]) # => Array[Id], the inserted rows' ids
543
+ Todo.where(id: 42).into(Todo).update(done: true) # => Array[Todo], the updated rows
544
+ Todo.where(done: true).into(Id).delete # => Array[Id], the deleted rows' ids
545
545
  ```
546
546
 
547
547
  `insert` and `insert_all` on a query take nothing but `into`. Anything else on the query, such as a `where`, an `order` or a join, raises an `ArgumentError` before any SQL runs.
@@ -4,7 +4,7 @@ module Skyward
4
4
  module ORM
5
5
  # x-release-please-start-version
6
6
 
7
- VERSION = '0.4.1' #: String
7
+ VERSION = '0.4.2' #: String
8
8
 
9
9
  # x-release-please-end
10
10
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: skyward-orm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jake Bottrall
@@ -15,14 +15,14 @@ dependencies:
15
15
  requirements:
16
16
  - - '='
17
17
  - !ruby/object:Gem::Version
18
- version: 0.4.1
18
+ version: 0.4.2
19
19
  type: :runtime
20
20
  prerelease: false
21
21
  version_requirements: !ruby/object:Gem::Requirement
22
22
  requirements:
23
23
  - - '='
24
24
  - !ruby/object:Gem::Version
25
- version: 0.4.1
25
+ version: 0.4.2
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: bigdecimal
28
28
  requirement: !ruby/object:Gem::Requirement