rom-sql 3.1.0 → 3.3.3

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 (92) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +214 -101
  3. data/LICENSE +1 -1
  4. data/README.md +12 -54
  5. data/lib/rom-sql.rb +2 -0
  6. data/lib/rom/plugins/relation/sql/auto_restrictions.rb +2 -0
  7. data/lib/rom/plugins/relation/sql/instrumentation.rb +2 -0
  8. data/lib/rom/plugins/relation/sql/postgres/explain.rb +6 -7
  9. data/lib/rom/plugins/relation/sql/postgres/full_text_search.rb +53 -0
  10. data/lib/rom/plugins/relation/sql/postgres/streaming.rb +108 -0
  11. data/lib/rom/sql.rb +2 -0
  12. data/lib/rom/sql/associations.rb +2 -0
  13. data/lib/rom/sql/associations/core.rb +3 -1
  14. data/lib/rom/sql/associations/many_to_many.rb +3 -1
  15. data/lib/rom/sql/associations/many_to_one.rb +2 -0
  16. data/lib/rom/sql/associations/one_to_many.rb +2 -0
  17. data/lib/rom/sql/associations/one_to_one.rb +2 -0
  18. data/lib/rom/sql/associations/one_to_one_through.rb +2 -0
  19. data/lib/rom/sql/associations/self_ref.rb +2 -0
  20. data/lib/rom/sql/attribute.rb +26 -7
  21. data/lib/rom/sql/attribute_aliasing.rb +28 -0
  22. data/lib/rom/sql/commands.rb +2 -0
  23. data/lib/rom/sql/commands/create.rb +2 -0
  24. data/lib/rom/sql/commands/delete.rb +2 -0
  25. data/lib/rom/sql/commands/error_wrapper.rb +2 -0
  26. data/lib/rom/sql/commands/update.rb +2 -0
  27. data/lib/rom/sql/dsl.rb +11 -3
  28. data/lib/rom/sql/error.rb +2 -0
  29. data/lib/rom/sql/errors.rb +2 -0
  30. data/lib/rom/sql/extensions.rb +2 -0
  31. data/lib/rom/sql/extensions/active_support_notifications.rb +2 -0
  32. data/lib/rom/sql/extensions/mysql.rb +2 -0
  33. data/lib/rom/sql/extensions/mysql/type_builder.rb +2 -0
  34. data/lib/rom/sql/extensions/postgres.rb +3 -0
  35. data/lib/rom/sql/extensions/postgres/commands.rb +3 -1
  36. data/lib/rom/sql/extensions/postgres/type_builder.rb +6 -4
  37. data/lib/rom/sql/extensions/postgres/type_serializer.rb +2 -0
  38. data/lib/rom/sql/extensions/postgres/types.rb +2 -0
  39. data/lib/rom/sql/extensions/postgres/types/array.rb +6 -4
  40. data/lib/rom/sql/extensions/postgres/types/array_types.rb +3 -1
  41. data/lib/rom/sql/extensions/postgres/types/geometric.rb +2 -0
  42. data/lib/rom/sql/extensions/postgres/types/json.rb +13 -11
  43. data/lib/rom/sql/extensions/postgres/types/ltree.rb +25 -23
  44. data/lib/rom/sql/extensions/postgres/types/network.rb +2 -0
  45. data/lib/rom/sql/extensions/postgres/types/range.rb +2 -0
  46. data/lib/rom/sql/extensions/rails_log_subscriber.rb +2 -0
  47. data/lib/rom/sql/extensions/sqlite.rb +2 -0
  48. data/lib/rom/sql/extensions/sqlite/type_builder.rb +2 -0
  49. data/lib/rom/sql/extensions/sqlite/types.rb +2 -0
  50. data/lib/rom/sql/foreign_key.rb +3 -1
  51. data/lib/rom/sql/function.rb +14 -3
  52. data/lib/rom/sql/gateway.rb +6 -1
  53. data/lib/rom/sql/group_dsl.rb +2 -0
  54. data/lib/rom/sql/index.rb +2 -0
  55. data/lib/rom/sql/join_dsl.rb +2 -0
  56. data/lib/rom/sql/mapper_compiler.rb +2 -0
  57. data/lib/rom/sql/migration.rb +5 -3
  58. data/lib/rom/sql/migration/inline_runner.rb +2 -0
  59. data/lib/rom/sql/migration/migrator.rb +4 -2
  60. data/lib/rom/sql/migration/recorder.rb +2 -0
  61. data/lib/rom/sql/migration/runner.rb +4 -2
  62. data/lib/rom/sql/migration/schema_diff.rb +2 -0
  63. data/lib/rom/sql/migration/template.rb +2 -0
  64. data/lib/rom/sql/migration/writer.rb +12 -4
  65. data/lib/rom/sql/order_dsl.rb +2 -0
  66. data/lib/rom/sql/plugin/associates.rb +4 -2
  67. data/lib/rom/sql/plugin/nullify.rb +2 -0
  68. data/lib/rom/sql/plugin/pagination.rb +2 -0
  69. data/lib/rom/sql/plugins.rb +2 -0
  70. data/lib/rom/sql/projection_dsl.rb +3 -1
  71. data/lib/rom/sql/rake_task.rb +2 -0
  72. data/lib/rom/sql/relation.rb +3 -1
  73. data/lib/rom/sql/relation/reading.rb +6 -4
  74. data/lib/rom/sql/relation/writing.rb +2 -0
  75. data/lib/rom/sql/restriction_dsl.rb +9 -1
  76. data/lib/rom/sql/schema.rb +16 -2
  77. data/lib/rom/sql/schema/attributes_inferrer.rb +5 -3
  78. data/lib/rom/sql/schema/dsl.rb +3 -1
  79. data/lib/rom/sql/schema/index_dsl.rb +5 -2
  80. data/lib/rom/sql/schema/inferrer.rb +12 -8
  81. data/lib/rom/sql/schema/type_builder.rb +4 -2
  82. data/lib/rom/sql/spec/support.rb +5 -3
  83. data/lib/rom/sql/tasks/migration_tasks.rake +16 -11
  84. data/lib/rom/sql/transaction.rb +2 -0
  85. data/lib/rom/sql/type_dsl.rb +2 -0
  86. data/lib/rom/sql/type_extensions.rb +3 -1
  87. data/lib/rom/sql/type_serializer.rb +2 -0
  88. data/lib/rom/sql/types.rb +2 -0
  89. data/lib/rom/sql/version.rb +3 -1
  90. data/lib/rom/sql/wrap.rb +2 -0
  91. data/lib/rom/types/values.rb +2 -0
  92. metadata +25 -45
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4f52d96de5f0817d048ca81908d0e1548fde8437314ce2842732fa0de1bc2a45
4
- data.tar.gz: e194b0a48c85a5a4651dcc1ff073f34e256aad05d22ff8255d16c17418948acf
3
+ metadata.gz: bfe5975f2fc0756a0a3f8239916f58c4f6dc307a3af1d7cdd1d62bbcd7c4cfc1
4
+ data.tar.gz: 68c896292b5bde03e255552acb84d6952d21bb705bedc43f6f36811f5bb350c1
5
5
  SHA512:
6
- metadata.gz: 7b9c43411663f8c89bc6df66df77afae600c1b053deb786b23aa7aabafcce6692b8265a11fe9431ea985cdff4d186d8d27cad7407729e2ddf8db8fc38dbb8d09
7
- data.tar.gz: 9ccb96a9bf4d8d2a6dd638313317fd992e925b1ad5bd4447813e74f6ff2e4a916a10376f37e8982bb0ac09647299a412bbcd27be2f95966f7d28d27e23789559
6
+ metadata.gz: d951459dc868955f1cddd1b77ac56f0aa8b71e556afd0cdea382241da0572a04c26da3f1fd9f73e49b53e93559e8b436d63681d0fefbe56f2e41e7284709012e
7
+ data.tar.gz: 7d151a47318bfe9ad5caeb5b0977dc31eb5f1577ed2707a43f4c88715c10bc0e00d4145571da8bff72e515ee1b7caa46911d0bfc896e570f303a1496f6436ae7
data/CHANGELOG.md CHANGED
@@ -1,5 +1,72 @@
1
+ <!--- DO NOT EDIT THIS FILE - IT'S AUTOMATICALLY GENERATED VIA DEVTOOLS --->
2
+
3
+ ## 3.3.3 2021-03-05
4
+
5
+
6
+ ### Added
7
+
8
+ - Support for streaming composite relations (@ianks)
9
+
10
+
11
+ [Compare v3.3.2...v3.3.3](https://github.com/rom-rb/rom-sql/compare/v3.3.2...v3.3.3)
12
+
13
+ ## 3.3.2 2021-01-06
14
+
15
+
16
+ ### Fixed
17
+
18
+ - Function qualification methods no longer lose options (issue #390 fixed via #391) (@solnic)
19
+
20
+
21
+ [Compare v3.3.1...v3.3.2](https://github.com/rom-rb/rom-sql/compare/v3.3.1...v3.3.2)
22
+
23
+ ## 3.3.1 2020-12-29
24
+
25
+
26
+ ### Fixed
27
+
28
+ - `:pg_streaming` plugin no longer crashes when there's no sequel_pg and now you need to require the plugin explicitly (@solnic)
29
+
30
+
31
+ [Compare v3.3.0...v3.3.1](https://github.com/rom-rb/rom-sql/compare/v3.3.0...v3.3.1)
32
+
33
+ ## 3.3.0 2020-12-28
34
+
35
+
36
+ ### Added
37
+
38
+ - `Relation#full_text_search` that provides an API for [PostgreSQL's Full Text Search](https://www.postgresql.org/docs/9.5/textsearch.html) (@ianks)
39
+
40
+ ```ruby
41
+ # Don't forget to activate the plugin
42
+ conf.plugin(:sql, relations: :pg_full_text_search)
43
+
44
+ posts.full_text_search([:title], 'tutorials', language: 'english')
45
+ # => [{ title: 'A Tutorial about SQL', ... }]
46
+ ```
47
+ - Support for `:pg_streaming` extension (@ianks)
48
+
49
+ ### Fixed
50
+
51
+ - `Relation#join` no longer crashes when aliased relation is used with a block (issue #369) (@abrthel)
52
+ - Attributes aliases are properly handled when constructing queries with SQL functions (issue #370 fixed via #373) (@abrthel)
53
+
54
+
55
+ [Compare v3.2.0...v3.3.0](https://github.com/rom-rb/rom-sql/compare/v3.2.0...v3.3.0)
56
+
57
+ ## 3.2.0 2020-01-11
58
+
59
+
60
+ ### Fixed
61
+
62
+ - Keyword warnings on Ruby 2.7 (@flash-gordon)
63
+
64
+
65
+ [Compare v3.1.0...v3.2.0](https://github.com/rom-rb/rom-sql/compare/v3.1.0...v3.2.0)
66
+
1
67
  ## 3.1.0 2019-12-16
2
68
 
69
+
3
70
  ### Added
4
71
 
5
72
  - `.nullify` that turns the result set of any relation into an empty set. Analogue of `ActiveRecord#none` (@ianks + @flash-gordon)
@@ -21,18 +88,22 @@
21
88
  - Properly qualify relations when in `Relation#union` (@ianks)
22
89
  - `Relation#query` no longer removes order in the relation (@DNNX)
23
90
 
91
+
24
92
  [Compare v3.0.1...v3.1.0](https://github.com/rom-rb/rom-sql/compare/v3.0.1...v3.1.0)
25
93
 
26
94
  ## 3.0.1 2019-05-05
27
95
 
96
+
28
97
  ### Fixed
29
98
 
30
99
  - Using joins with a relation object as the target and a block-based conditions produces correct query now (issue #331) (solnic)
31
100
 
101
+
32
102
  [Compare v3.0.0...v3.0.1](https://github.com/rom-rb/rom-sql/compare/v3.0.0...v3.0.1)
33
103
 
34
104
  ## 3.0.0 2019-04-24
35
105
 
106
+
36
107
  ### Added
37
108
 
38
109
  - Join DSL so that you can use arbitrary conditions when joining relations (flash-gordon)
@@ -58,7 +129,6 @@
58
129
  # searching for `true` result
59
130
  users.select_append { string::case(id.is(1) => 'one', else: 'else').as(:one_or_else) }
60
131
  ```
61
-
62
132
  - Relations can be accessed in DSLs with keyword arguments (flash-gordon)
63
133
  ```ruby
64
134
  users.join(posts).select_append { |posts: | posts[:title] }
@@ -71,30 +141,29 @@
71
141
  ```
72
142
  - `Relation#unfiltered` returns an unrestricted relation (removes restrictions from `WHERE` and `HAVING`) (flash-gordon)
73
143
  - Support for `WITHIN GROUP` in the function DSL has been enhanced with block syntax (flash-gordon)
74
-
75
- ```ruby
76
- # previously available version
77
- households.project { float::percentile_cont(0.5).within_group(income).as(:percentile) }
78
- # using the new syntax
79
- households.project { float::percentile_cont(0.5).within_group { income }.as(:percentile) }
80
- ```
81
-
144
+ - ```ruby
145
+ - # previously available version
146
+ - households.project { float::percentile_cont(0.5).within_group(income).as(:percentile) }
147
+ - # using the new syntax
148
+ - households.project { float::percentile_cont(0.5).within_group { income }.as(:percentile) }
149
+ - ```
82
150
  - Support for migrator options ie `ROM::Configuration.new(:sql, migrator: { path: "my_migrations" })` (rawburt)
83
151
  - `Relation#pluck` works with multiple args too (timriley)
84
152
 
85
- ### Changed
86
-
87
- - [BREAKING] Updated to work with `dry-types 1.0.0` (flash-gordon)
88
- - [BREAKING] `Types::Int` is now `Types::Integer` (GustavoCaso)
89
-
90
153
  ### Fixed
91
154
 
92
155
  - Using `Relation#inner_join` with has-many-through produces correct query (issue #279) (doriantaylor + solnic)
93
156
  - Aliased attributes are handled correctly in `Relation#where` (waiting-for-dev)
94
157
 
158
+ ### Changed
159
+
160
+ - [BREAKING] Updated to work with `dry-types 1.0.0` (flash-gordon)
161
+ - [BREAKING] `Types::Int` is now `Types::Integer` (GustavoCaso)
162
+
95
163
  [Compare v2.5.0...v3.0.0](https://github.com/rom-rb/rom-sql/compare/v2.5.0...v3.0.0)
96
164
 
97
- ## v2.5.0 2018-06-08
165
+ ## 2.5.0 2018-06-08
166
+
98
167
 
99
168
  ### Added
100
169
 
@@ -103,22 +172,26 @@
103
172
  tasks = relations[:tasks]
104
173
  users = relations[:users]
105
174
  user_tasks = tasks.where(tasks[:user_id].is(users[:id])
106
- tasks_count = user_tasks.select { integer::count(id) }
175
+ tasks_count = user_tasks.select { integer::count(id) }.query
107
176
  users.select_append(tasks_count.as(:tasks_count))
108
177
  ```
109
178
 
179
+
110
180
  [Compare v2.4.0...v2.5.0](https://github.com/rom-rb/rom-sql/compare/v2.4.0...v2.5.0)
111
181
 
112
- ## v2.4.0 2018-02-18
182
+ ## 2.4.0 2018-02-18
183
+
113
184
 
114
185
  ### Added
115
186
 
116
187
  - Support for functions with `Any` return type (GustavoCaso)
117
188
  - New `Relation#as_hash` method (GustavoCaso)
118
189
 
190
+
119
191
  [Compare v2.3.0...v2.4.0](https://github.com/rom-rb/rom-sql/compare/v2.3.0...v2.4.0)
120
192
 
121
- ## v2.3.0 2017-11-17
193
+ ## 2.3.0 2017-11-17
194
+
122
195
 
123
196
  ### Added
124
197
 
@@ -130,23 +203,22 @@
130
203
  - Aliased attributes are handled correctly in PG's commands (cflipse)
131
204
  - Command extensions are properly applied in multi-adapter setups (solnic)
132
205
 
133
- ### Internal
134
-
135
- - Custom SQL-specific mapper compiler was added, which is used starting from rom-core 4.1.0 (solnic)
136
- - Command's `:timestamp` plugin was removed, as it was moved to rom-core (GustavoCaso)
137
206
 
138
207
  [Compare v2.2.1...v2.3.0](https://github.com/rom-rb/rom-sql/compare/v2.2.1...v2.3.0)
139
208
 
140
- ## v2.2.1 2017-11-10
209
+ ## 2.2.1 2017-11-10
210
+
141
211
 
142
212
  ### Fixed
143
213
 
144
214
  - Instrumentation works with all db interactions (not just queries that materialize relations) (solnic)
145
215
  - Typo in `MissingEnv` exception message (romatr)
146
216
 
217
+
147
218
  [Compare v2.2.0...v2.2.1](https://github.com/rom-rb/rom-sql/compare/v2.2.0...v2.2.1)
148
219
 
149
- ## v2.2.0 2017-11-02
220
+ ## 2.2.0 2017-11-02
221
+
150
222
 
151
223
  ### Added
152
224
 
@@ -159,9 +231,11 @@
159
231
  - Custom schema is used correctly in command results (solnic)
160
232
  - Schemas no longer finalize PKs (this is done in core schema already) (solnic)
161
233
 
234
+
162
235
  [Compare v2.1.0...v2.2.0](https://github.com/rom-rb/rom-sql/compare/v2.1.0...v2.2.0)
163
236
 
164
- ## v2.1.0 2017-10-23
237
+ ## 2.1.0 2017-10-23
238
+
165
239
 
166
240
  ### Added
167
241
 
@@ -175,9 +249,11 @@
175
249
  - Schema inference works with primary keys that have custom types (ie an enum PK column) (v-kolesnikov)
176
250
  - Ruby warnings are gone (solnic)
177
251
 
252
+
178
253
  [Compare v2.0.0...v2.1.0](https://github.com/rom-rb/rom-sql/compare/v2.0.0...v2.1.0)
179
254
 
180
- ## v2.0.0 2017-10-18
255
+ ## 2.0.0 2017-10-18
256
+
181
257
 
182
258
  ### Added
183
259
 
@@ -195,7 +271,6 @@
195
271
  end
196
272
  end
197
273
  ```
198
-
199
274
  - Support for composite indexes in the auto-restrictions plugin (flash-gordon)
200
275
  - `SQL::Gateway#call` calls a SQL function (flash-gordon)
201
276
 
@@ -203,19 +278,16 @@
203
278
  gateway.(:upper, 'foo') # => "FOO"
204
279
  gateway.(:pg_advisory_xact_lock, 1234) # => nil
205
280
  ```
206
-
207
281
  - `SQL::Gateway#run` executes a SQL string, e.g. a DDL statement (flash-gordon)
208
282
 
209
283
  ```ruby
210
284
  gateway.run('set session IntervalStyle to default')
211
285
  ```
212
-
213
286
  - `SQL::Relation#exists` joins a relation with the `EXISTS` operator (flash-gordon)
214
287
 
215
288
  ```ruby
216
289
  users.exists(posts) # => users with posts
217
290
  ```
218
-
219
291
  - Support for processing a relation in batches (flash-gordon)
220
292
 
221
293
  ```ruby
@@ -225,26 +297,22 @@
225
297
  call(name: users[:first_name].concat(users[:last_name])
226
298
  end
227
299
  ```
228
-
229
300
  - `SQL::Relation#import` inserts data from another relation using the `INSERT ... AS SELECT` syntax which is often far more effective than row-by-row processing and an ordinary multi-insert. Relations defined on another gateway are also supported, and in this case, the implementation falls back to the multi-insert strategy (flash-gordon)
230
301
 
231
302
  ```ruby
232
303
  users.import(authors.select { first_name.concat(last_name).as(:name) })
233
304
  ```
234
-
235
305
  - Support for `tinytext`, `text`, `mediumtext`, and `longtext data types in MySQL (panthomakos)
236
306
  - The new `pg_explain` plugin for getting query plans on PostgreSQL (flash-gordon)
237
307
 
238
308
  ```ruby
239
309
  users.by_pk(1).explain(format: :json, analyze: true)
240
310
  ```
241
-
242
311
  - Support for window function calls
243
312
 
244
313
  ```ruby
245
314
  employees.select { [dep_no, salary, integer::avg(salary).over(partition: dep_no, order: id).as(:avg_salary)] }
246
315
  ```
247
-
248
316
  - Function result can be negated, also `ROM::SQL::Function#not` was added (flash-gordon)
249
317
 
250
318
  ```ruby
@@ -252,6 +320,13 @@
252
320
  users.where { lower(name).not('John') }
253
321
  ```
254
322
 
323
+ ### Fixed
324
+
325
+ - Self-ref associations work correctly with custom FKs (solnic)
326
+ - Aliased associations with custom FKs work correctly (solnic)
327
+ - Defining a custom dataset block no longer prevents default views like `by_pk` to be defined (solnic)
328
+ - `Relation#group` uses canonical schema now (solnic)
329
+
255
330
  ### Changed
256
331
 
257
332
  - [BREAKING] based on rom 4.0 now (flash-gordon + solnic)
@@ -265,16 +340,10 @@
265
340
  - Schemas are qualified by default (solnic)
266
341
  - `PG::JSON`, `PG::JSONB`, and `PG::Array` now all have read types so that they return plain Hash/Array values instead of Sequel's wrappers (flash-gordon)
267
342
 
268
- ### Fixed
269
-
270
- - Self-ref associations work correctly with custom FKs (solnic)
271
- - Aliased associations with custom FKs work correctly (solnic)
272
- - Defining a custom dataset block no longer prevents default views like `by_pk` to be defined (solnic)
273
- - `Relation#group` uses canonical schema now (solnic)
343
+ [Compare v1.3.3...v2.0.0](https://github.com/rom-rb/rom-sql/compare/v1.3.3...v2.0.0)
274
344
 
275
- [Compare v1.3.3...master](https://github.com/rom-rb/rom-sql/compare/v1.3.3...master)
345
+ ## 1.3.3 2017-05-30
276
346
 
277
- ## v1.3.3 2017-05-30
278
347
 
279
348
  ### Added
280
349
 
@@ -285,7 +354,6 @@
285
354
  ```ruby
286
355
  users.select { string::cast(id, 'varchar').as(:id_str) }
287
356
  ```
288
-
289
357
  - Support for`EXISTS` (v-kolesnikov)
290
358
 
291
359
  ```ruby
@@ -297,9 +365,11 @@
297
365
 
298
366
  - Fixed a regression introduced in v1.3.2 caused by doing way more work processing the default dataset (flash-gordon)
299
367
 
368
+
300
369
  [Compare v1.3.2...v1.3.3](https://github.com/rom-rb/rom-sql/compare/v1.3.2...v1.3.3)
301
370
 
302
- ## v1.3.2 2017-05-13
371
+ ## 1.3.2 2017-05-13
372
+
303
373
 
304
374
  ### Added
305
375
 
@@ -311,9 +381,11 @@
311
381
 
312
382
  - A bunch of warnings from Sequel 4.46
313
383
 
384
+
314
385
  [Compare v1.3.1...v1.3.2](https://github.com/rom-rb/rom-sql/compare/v1.3.1...v1.3.2)
315
386
 
316
- ## v1.3.1 2017-05-05
387
+ ## 1.3.1 2017-05-05
388
+
317
389
 
318
390
  ### Changed
319
391
 
@@ -321,7 +393,8 @@
321
393
 
322
394
  [Compare v1.3.0...v1.3.1](https://github.com/rom-rb/rom-sql/compare/v1.3.0...v1.3.1)
323
395
 
324
- ## v1.3.0 2017-05-02
396
+ ## 1.3.0 2017-05-02
397
+
325
398
 
326
399
  ### Added
327
400
 
@@ -353,7 +426,8 @@
353
426
 
354
427
  [Compare v1.2.2...v1.3.0](https://github.com/rom-rb/rom-sql/compare/v1.2.2...v1.3.0)
355
428
 
356
- ## v1.2.2 2017-03-25
429
+ ## 1.2.2 2017-03-25
430
+
357
431
 
358
432
  ### Changed
359
433
 
@@ -361,15 +435,18 @@
361
435
 
362
436
  [Compare v1.2.1...v1.2.2](https://github.com/rom-rb/rom-sql/compare/v1.2.1...v1.2.2)
363
437
 
364
- ## v1.2.1 2017-03-09
438
+ ## 1.2.1 2017-03-09
439
+
365
440
 
366
441
  ### Fixed
367
442
 
368
443
  - Allow for joining by a `RelationProxy` instance from `rom-repository` (davydovanton)
369
444
 
445
+
370
446
  [Compare v1.2.0...v1.2.1](https://github.com/rom-rb/rom-sql/compare/v1.2.0...v1.2.1)
371
447
 
372
- ## v1.2.0 2017-03-07
448
+ ## 1.2.0 2017-03-07
449
+
373
450
 
374
451
  ### Added
375
452
 
@@ -377,25 +454,31 @@
377
454
  - Support for passing parent tuple(s) as `parent` option in `Command#with_association` (solnic)
378
455
  - Support for join using assocation name (flash-gordon)
379
456
 
457
+
380
458
  [Compare v1.1.2...v1.2.0](https://github.com/rom-rb/rom-sql/compare/v1.1.2...v1.2.0)
381
459
 
382
- ## v1.1.2 2017-03-02
460
+ ## 1.1.2 2017-03-02
461
+
383
462
 
384
463
  ### Fixed
385
464
 
386
465
  - Fix grouping by a function in the block DSL (flash-gordon)
387
466
 
467
+
388
468
  [Compare v1.1.1...v1.1.2](https://github.com/rom-rb/rom-sql/compare/v1.1.1...v1.1.2)
389
469
 
390
- ## v1.1.1 2017-03-01
470
+ ## 1.1.1 2017-03-01
471
+
391
472
 
392
473
  ### Fixed
393
474
 
394
475
  - Restriction conditions with an array as a value are handled correctly by attribute types (solnic)
395
476
 
477
+
396
478
  [Compare v1.1.0...v1.1.1](https://github.com/rom-rb/rom-sql/compare/v1.1.0...v1.1.1)
397
479
 
398
- ## v1.1.0 2017-03-01
480
+ ## 1.1.0 2017-03-01
481
+
399
482
 
400
483
  ### Added
401
484
 
@@ -409,29 +492,34 @@
409
492
  - Missing `group` method was added to legacy `SequelAPI` module (solnic)
410
493
  - Associations properly maintain `order` if it was set (solnic)
411
494
 
412
- [Compare v1.0.3...v1.1.0](https://github.com/rom-rb/rom-sql/compare/v1.0.3...v1.1.0)
413
495
 
414
- ## v1.0.3 2017-02-23
496
+ [Compare v1.0.3...v1.1.0](https://github.com/rom-rb/rom-sql/compare/v1.0.3...v1.1.0)
415
497
 
416
- ### Changed
498
+ ## 1.0.3 2017-02-23
417
499
 
418
- - `AutoCombine#preload` uses better restriction for `ManyToOne` association which greatly speeds up loading bigger amounts of data (solnic + flash-gordon)
419
500
 
420
501
  ### Fixed
421
502
 
422
503
  - Fix the usage of timestamp in command chains (cflipse)
423
504
 
505
+ ### Changed
506
+
507
+ - `AutoCombine#preload` uses better restriction for `ManyToOne` association which greatly speeds up loading bigger amounts of data (solnic + flash-gordon)
508
+
424
509
  [Compare v1.0.2...v1.0.3](https://github.com/rom-rb/rom-sql/compare/v1.0.2...v1.0.3)
425
510
 
426
- ## v1.0.2 2017-02-16
511
+ ## 1.0.2 2017-02-16
512
+
427
513
 
428
514
  ### Added
429
515
 
430
516
  - Support for selecting literal strings via `` select { `'foo'`.as(:bar) } `` (solnic)
431
517
 
518
+
432
519
  [Compare v1.0.1...v1.0.2](https://github.com/rom-rb/rom-sql/compare/v1.0.1...v1.0.2)
433
520
 
434
- ## v1.0.1 2017-02-09
521
+ ## 1.0.1 2017-02-09
522
+
435
523
 
436
524
  ### Added
437
525
 
@@ -444,11 +532,10 @@
444
532
 
445
533
  - Missing primary key now leads to a more meaningful error (flash-gordon)
446
534
 
447
- [Compare v1.0.0...v1.0.1](https://github.com/rom-rb/rom-sql/compare/v1.0.0...v1.0.1)
448
535
 
449
- ## v1.0.0 2017-01-29
536
+ [Compare v1.0.0...v1.0.1](https://github.com/rom-rb/rom-sql/compare/v1.0.0...v1.0.1)
450
537
 
451
- This release is based on rom core 3.0.0 with its improved Schema API, which is extended with SQL-specific features.
538
+ ## 1.0.0 2017-01-29
452
539
 
453
540
  Please refer to [the upgrading guide](https://github.com/rom-rb/rom-sql/wiki/Upgrading-from-0.9.x-to-1.0.0) if you're moving from 0.9.x to 1.0.0.
454
541
 
@@ -488,16 +575,19 @@ Please refer to [the upgrading guide](https://github.com/rom-rb/rom-sql/wiki/Upg
488
575
 
489
576
  [Compare v0.9.1...v1.0.0](https://github.com/rom-rb/rom-sql/compare/v0.9.1...v1.0.0)
490
577
 
491
- ## v0.9.1 2016-12-23
578
+ ## 0.9.1 2016-12-23
579
+
492
580
 
493
581
  ### Added
494
582
 
495
583
  - Support for PG enums in schema inferrer (flash-gordon)
496
584
  - `ROM::SQL::Relation#read` method which accepts an SQL string and returns a new relation (solnic)
497
585
 
586
+
498
587
  [Compare v0.9.0...v0.9.1](https://github.com/rom-rb/rom-sql/compare/v0.9.0...v0.9.1)
499
588
 
500
- ## v0.9.0 2016-11-08
589
+ ## 0.9.0 2016-11-08
590
+
501
591
 
502
592
  ### Added
503
593
 
@@ -507,6 +597,10 @@ Please refer to [the upgrading guide](https://github.com/rom-rb/rom-sql/wiki/Upg
507
597
  - Automatically infer PG arrays and JSON(B) types (jodosha + flash-gordon)
508
598
  - Support for `Relation#having` (cflipse)
509
599
 
600
+ ### Fixed
601
+
602
+ - Floats are inferred by schemas (cflipse)
603
+
510
604
  ### Changed
511
605
 
512
606
  - Inferred types in schemas **are no longer strict** (flash-gordon)
@@ -514,13 +608,10 @@ Please refer to [the upgrading guide](https://github.com/rom-rb/rom-sql/wiki/Upg
514
608
  - Make `OneToOne` inherit from `OneToMany` (beauby)
515
609
  - Default dataset will use column names from schema if it's available (solnic)
516
610
 
517
- ### Fixed
518
-
519
- - Floats are inferred by schemas (cflipse)
520
-
521
611
  [Compare v0.8.0...v0.9.0](https://github.com/rom-rb/rom-sql/compare/v0.8.0...v0.9.0)
522
612
 
523
- ## v0.8.0 2016-07-27
613
+ ## 0.8.0 2016-07-27
614
+
524
615
 
525
616
  ### Added
526
617
 
@@ -536,19 +627,20 @@ Please refer to [the upgrading guide](https://github.com/rom-rb/rom-sql/wiki/Upg
536
627
  - Support for arbitrary dataset and FK names in schemas (flash-gordon)
537
628
  - Support for native upserts in PostgreSQL >= 9.5 via `Commands::Postgres::Upsert` (gotar + flash-gordon)
538
629
 
630
+ ### Fixed
631
+
632
+ - `Create` command properly materialize result when `:one` is set (AMHOL)
633
+
539
634
  ### Changed
540
635
 
541
636
  - `Create` and `Update` commands have `:schema` plugin enabled by default which sets input handler based on schema definition automatically (solnic)
542
637
  - `associates` command plugin uses schema associations now (solnic)
543
638
  - Dropped MRI 2.0.x support
544
639
 
545
- ### Fixed
546
-
547
- - `Create` command properly materialize result when `:one` is set (AMHOL)
548
-
549
640
  [Compare v0.7.0...v0.8.0](https://github.com/rom-rb/rom-sql/compare/v0.7.0...v0.8.0)
550
641
 
551
- ## v0.7.0 2016-01-06
642
+ ## 0.7.0 2016-01-06
643
+
552
644
 
553
645
  ### Added
554
646
 
@@ -575,37 +667,42 @@ Please refer to [the upgrading guide](https://github.com/rom-rb/rom-sql/wiki/Upg
575
667
 
576
668
  [Compare v0.6.1...v0.7.0](https://github.com/rom-rb/rom-sql/compare/v0.6.1...v0.7.0)
577
669
 
578
- ## v0.6.1 2015-09-23
670
+ ## 0.6.1 2015-09-23
671
+
579
672
 
580
673
  ### Added
581
674
 
582
675
  - `Gateway` accepts `:extensions` as an option (c0)
583
676
 
677
+
584
678
  [Compare v0.6.0...v0.6.1](https://github.com/rom-rb/rom-sql/compare/v0.6.0...v0.6.1)
585
679
 
586
- ## v0.6.0 2015-08-19
680
+ ## 0.6.0 2015-08-19
587
681
 
588
682
  Internal updates to fix deprecation warnings from ROM 0.9.0.
589
683
 
684
+
590
685
  [Compare v0.5.3...v0.6.0](https://github.com/rom-rb/rom-sql/compare/v0.5.3...v0.6.0)
591
686
 
592
- ## v0.5.3 2015-07-23
687
+ ## 0.5.3 2015-07-23
688
+
593
689
 
594
690
  ### Added
595
691
 
596
692
  - `Relation#multi_insert` (draxxxeus)
597
693
 
598
- ### Changed
599
-
600
- - Command that receives many tuples will use `multi_insert` now (draxxxeus)
601
-
602
694
  ### Fixed
603
695
 
604
696
  - Relation name and join key fixes for `many_to_one` macro (jamesmoriarty)
605
697
 
698
+ ### Changed
699
+
700
+ - Command that receives many tuples will use `multi_insert` now (draxxxeus)
701
+
606
702
  [Compare v0.5.2...v0.5.3](https://github.com/rom-rb/rom-sql/compare/v0.5.2...v0.5.3)
607
703
 
608
- ## v0.5.2 2015-06-22
704
+ ## 0.5.2 2015-06-22
705
+
609
706
 
610
707
  ### Added
611
708
 
@@ -618,19 +715,21 @@ Internal updates to fix deprecation warnings from ROM 0.9.0.
618
715
 
619
716
  [Compare v0.5.1...v0.5.2](https://github.com/rom-rb/rom-sql/compare/v0.5.1...v0.5.2)
620
717
 
621
- ## v0.5.1 2015-05-25
622
-
623
- ### Changed
718
+ ## 0.5.1 2015-05-25
624
719
 
625
- - Relations won't be finalized when table(s) is/are missing (solnic)
626
720
 
627
721
  ### Fixed
628
722
 
629
723
  - Wrap errors when calling commands with `[]`-syntax (kwando)
630
724
 
725
+ ### Changed
726
+
727
+ - Relations won't be finalized when table(s) is/are missing (solnic)
728
+
631
729
  [Compare v0.5.0...v0.5.1](https://github.com/rom-rb/rom-sql/compare/v0.5.0...v0.5.1)
632
730
 
633
- ## v0.5.0 2015-05-22
731
+ ## 0.5.0 2015-05-22
732
+
634
733
 
635
734
  ### Added
636
735
 
@@ -649,17 +748,20 @@ Internal updates to fix deprecation warnings from ROM 0.9.0.
649
748
  - `Commands::Update#set` has been deprecated (solnic)
650
749
  - `Commands::Update#to` has been deprecated (solnic)
651
750
 
652
- [Compare v0.4.3...v0.5.0](https://github.com/rom-rb/rom-sql/compare/v0.4.2...v0.5.0)
751
+ [Compare v0.4.3...v0.5.0](https://github.com/rom-rb/rom-sql/compare/v0.4.3...v0.5.0)
752
+
753
+ ## 0.4.3 2015-05-17
653
754
 
654
- ## v0.4.3 2015-05-17
655
755
 
656
756
  ### Fixed
657
757
 
658
758
  - `transaction` doesn't swallow errors now other than CommandError (solnic)
659
759
 
760
+
660
761
  [Compare v0.4.2...v0.4.3](https://github.com/rom-rb/rom-sql/compare/v0.4.2...v0.4.3)
661
762
 
662
- ## v0.4.2 2015-05-17
763
+ ## 0.4.2 2015-05-17
764
+
663
765
 
664
766
  ### Added
665
767
 
@@ -679,16 +781,19 @@ Internal updates to fix deprecation warnings from ROM 0.9.0.
679
781
 
680
782
  [Compare v0.4.1...v0.4.2](https://github.com/rom-rb/rom-sql/compare/v0.4.1...v0.4.2)
681
783
 
682
- ## v0.4.1 2015-04-04
784
+ ## 0.4.1 2015-04-04
785
+
683
786
 
684
787
  ### Added
685
788
 
686
789
  - Database error handling for update and delete commands (kwando + solnic)
687
790
  - Migration interface as a repository plugin (gotar + solnic)
688
791
 
792
+
689
793
  [Compare v0.4.0...v0.4.1](https://github.com/rom-rb/rom-sql/compare/v0.4.0...v0.4.1)
690
794
 
691
- ## v0.4.0 2015-03-22
795
+ ## 0.4.0 2015-03-22
796
+
692
797
 
693
798
  ### Added
694
799
 
@@ -699,34 +804,39 @@ Internal updates to fix deprecation warnings from ROM 0.9.0.
699
804
  - Pagination plugin (solnic)
700
805
  - Allow reuse of established Sequel connections (splattael)
701
806
 
702
- ### Changed
703
-
704
- - Use ROM's own inflector which uses either ActiveSupport or Inflecto backends (mjtko)
705
-
706
807
  ### Fixed
707
808
 
708
809
  - Indentation in Rails logger (morgoth)
709
810
 
811
+ ### Changed
812
+
813
+ - Use ROM's own inflector which uses either ActiveSupport or Inflecto backends (mjtko)
814
+
710
815
  [Compare v0.3.2...v0.4.0](https://github.com/rom-rb/rom-sql/compare/v0.3.2...v0.4.0)
711
816
 
712
- ## v0.3.2 2015-01-01
817
+ ## 0.3.2 2015-01-01
818
+
713
819
 
714
820
  ### Fixed
715
821
 
716
822
  - Checking tuple count in commands (solnic)
717
823
 
824
+
718
825
  [Compare v0.3.1...v0.3.2](https://github.com/rom-rb/rom-sql/compare/v0.3.1...v0.3.2)
719
826
 
720
- ## v0.3.1 2014-12-31
827
+ ## 0.3.1 2014-12-31
828
+
721
829
 
722
830
  ### Added
723
831
 
724
832
  - `Adapter#disconnect` (solnic)
725
833
  - Support for extra connection options (solnic)
726
834
 
835
+
727
836
  [Compare v0.3.0...v0.3.1](https://github.com/rom-rb/rom-sql/compare/v0.3.0...v0.3.1)
728
837
 
729
- ## v0.3.0 2014-12-19
838
+ ## 0.3.0 2014-12-19
839
+
730
840
 
731
841
  ### Changed
732
842
 
@@ -735,7 +845,8 @@ Internal updates to fix deprecation warnings from ROM 0.9.0.
735
845
 
736
846
  [Compare v0.2.0...v0.3.0](https://github.com/rom-rb/rom-sql/compare/v0.2.0...v0.3.0)
737
847
 
738
- ## v0.2.0 2014-12-06
848
+ ## 0.2.0 2014-12-06
849
+
739
850
 
740
851
  ### Added
741
852
 
@@ -743,9 +854,11 @@ Internal updates to fix deprecation warnings from ROM 0.9.0.
743
854
  - Support for ActiveSupport::Notifications with a log subscriber (solnic)
744
855
  - New `ROM::SQL::Adapter#dataset?(name)` checking if a given table exists (solnic)
745
856
 
857
+
746
858
  [Compare v0.1.1...v0.2.0](https://github.com/rom-rb/rom-sql/compare/v0.1.1...v0.2.0)
747
859
 
748
- ## v0.1.1 2014-11-24
860
+ ## 0.1.1 2014-11-24
861
+
749
862
 
750
863
  ### Fixed
751
864
 
@@ -757,6 +870,6 @@ Internal updates to fix deprecation warnings from ROM 0.9.0.
757
870
 
758
871
  [Compare v0.1.0...v0.1.1](https://github.com/rom-rb/rom-sql/compare/v0.1.0...v0.1.1)
759
872
 
760
- ## v0.1.0 2014-11-24
873
+ ## 0.1.0 2014-11-24
761
874
 
762
875
  First release powered by Sequel