-
-
Notifications
You must be signed in to change notification settings - Fork 93
/
changelog.yml
681 lines (662 loc) · 26.9 KB
/
changelog.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
- version: 3.6.5
summary:
date: 2024-12-25
fixed:
- "Fix syntax error under Ruby 3.4 (@flash-gordon)"
- version: 3.6.4
summary:
date: 2024-07-01
fixed:
- "Excessive logging when same gateway is shared between multiple containers (@flash-gordon)"
- "Warning about using color option from active-support log subscriber (@flash-gordon + @bendangelo)"
- version: 3.6.3
summary:
date: 2024-05-06
fixed:
- "Fix using `.filter` with a block for aggregate functions (@flash-gordon)"
- version: 3.6.2
summary:
date: 2024-01-09
fixed:
- "Fix Hash.new warning in Ruby 3.3 (@flash-gordon)"
- version: 3.6.1
summary:
date: 2022-11-22
fixed:
- "Mapping of cidr types in PostgreSQL to IPAddr values (@flash-gordon)"
- version: 3.6.0
summary:
date: 2022-11-11
added:
- "Add ROM::SQL::RakeSupport.migration_options for passing custom options to migrator (@wuarmin)"
changed:
- "Upgraded to the latest versions of dry-rb dependencies, compatible with rom 5.3 (@flash-gordon)"
- version: 3.5.0
summary:
date: 2021-03-26
fixed:
- "Restore the fix for #390 that was lost by an accident in 3.3.3 and 3.4.0 (@solnic)"
added:
- "Support for using partial indixes in PG upsert commands (issue #394 fixed via #395) (@smaximov)"
- version: 3.4.0
summary:
date: 2021-03-19
added:
- "`Relation#unordered` (@radar)"
- version: 3.3.3
summary:
date: 2021-03-05
fixed:
added:
- Support for streaming composite relations (@ianks)
changed:
- version: 3.3.2
summary:
date: '2021-01-06'
fixed:
- 'Function qualification methods no longer lose options (issue #390 fixed via #391)
(@solnic)'
added:
changed:
- version: 3.3.1
date: '2020-12-29'
fixed:
- "`:pg_streaming` plugin no longer crashes when there's no sequel_pg and now you
need to require the plugin explicitly (@solnic)"
- version: 3.3.0
summary:
date: '2020-12-28'
fixed:
- "`Relation#join` no longer crashes when aliased relation is used with a block
(issue #369) (@abrthel)"
- 'Attributes aliases are properly handled when constructing queries with SQL functions
(issue #370 fixed via #373) (@abrthel)'
added:
- |-
`Relation#full_text_search` that provides an API for [PostgreSQL's Full Text Search](https://www.postgresql.org/docs/9.5/textsearch.html) (@ianks)
```ruby
# Don't forget to activate the plugin
conf.plugin(:sql, relations: :pg_full_text_search)
posts.full_text_search([:title], 'tutorials', language: 'english')
# => [{ title: 'A Tutorial about SQL', ... }]
```
- Support for `:pg_streaming` extension (@ianks)
changed:
- version: 3.2.0
date: '2020-01-11'
fixed:
- Keyword warnings on Ruby 2.7 (@flash-gordon)
- version: 3.1.0
date: '2019-12-16'
added:
- |-
`.nullify` that turns the result set of any relation into an empty set. Analogue of `ActiveRecord#none` (@ianks + @flash-gordon)
```ruby
# Don't forget to activate the plugin
conf.relation(:users) do
use :nullify
end
users.nullify.count # => will always be 0
users.nullify.to_a # => will always be empty ([])
```
fixed:
- Make `Relation#wrap` respect association views (@ianks)
- Primitive JSON-compatible values such as Integer and String are automatically
coerced to correct JSONB values and back if you're using a recent Sequel version
(>= 5.2.0) (@flash-gordon)
- Properly qualify relations when in `Relation#union` (@ianks)
- "`Relation#query` no longer removes order in the relation (@DNNX)"
- version: 3.0.1
date: '2019-05-05'
fixed:
- 'Using joins with a relation object as the target and a block-based conditions
produces correct query now (issue #331) (solnic)'
- version: 3.0.0
date: '2019-04-24'
added:
- |-
Join DSL so that you can use arbitrary conditions when joining relations (flash-gordon)
```ruby
users.join(tasks) { |users:, tasks:|
tasks[:user_id].is(users[:id]) & users[:name].is('John')
}
```
You also can use table aliases, however the setup is a bit hairy:
```ruby
# self-join "users" with itself using "authors" as an alias
authors = users.as(:authors).qualified(:authors)
result = users.join(authors) { |users: |
users[:id].is(authors[:id])
}.select(:name)
```
- |-
Support for `CASE` expression (wmaciejak + flash-gordon)
```ruby
# matching expression result
users.select_append { id.case(1 => string('one'), else: string('something else')).as(:one_or_else) }
# searching for `true` result
users.select_append { string::case(id.is(1) => 'one', else: 'else').as(:one_or_else) }
```
- |-
Relations can be accessed in DSLs with keyword arguments (flash-gordon)
```ruby
users.join(posts).select_append { |posts: | posts[:title] }
```
- |-
Support for `.exists` in the projection DSL (flash-gordon)
```ruby
users.select_append { |posts: |
exists(posts.where(posts[:user_id] => id)).as(:has_posts)
}
```
- "`Relation#unfiltered` returns an unrestricted relation (removes restrictions
from `WHERE` and `HAVING`) (flash-gordon)"
- Support for `WITHIN GROUP` in the function DSL has been enhanced with block syntax
(flash-gordon)
- "```ruby"
- "# previously available version"
- households.project { float::percentile_cont(0.5).within_group(income).as(:percentile)
}
- "# using the new syntax"
- households.project { float::percentile_cont(0.5).within_group { income }.as(:percentile)
}
- "```"
- 'Support for migrator options ie `ROM::Configuration.new(:sql, migrator: { path:
"my_migrations" })` (rawburt)'
- "`Relation#pluck` works with multiple args too (timriley)"
changed:
- "[BREAKING] Updated to work with `dry-types 1.0.0` (flash-gordon)"
- "[BREAKING] `Types::Int` is now `Types::Integer` (GustavoCaso)"
fixed:
- 'Using `Relation#inner_join` with has-many-through produces correct query (issue
#279) (doriantaylor + solnic)'
- Aliased attributes are handled correctly in `Relation#where` (waiting-for-dev)
- version: 2.5.0
date: '2018-06-08'
added:
- |-
Support for subqueries in `SELECT` and `WHERE` :tada: (flash-gordon)
```ruby
tasks = relations[:tasks]
users = relations[:users]
user_tasks = tasks.where(tasks[:user_id].is(users[:id])
tasks_count = user_tasks.select { integer::count(id) }.query
users.select_append(tasks_count.as(:tasks_count))
```
- version: 2.4.0
date: '2018-02-18'
added:
- Support for functions with `Any` return type (GustavoCaso)
- New `Relation#as_hash` method (GustavoCaso)
- version: 2.3.0
date: '2017-11-17'
added:
- Command's `:timestamp` plugin now supports passing options (GustavoCaso)
- Configuration supports hash with connection options (Kjarrigan + solnic)
fixed:
- Aliased attributes are handled correctly in PG's commands (cflipse)
- Command extensions are properly applied in multi-adapter setups (solnic)
- version: 2.2.1
date: '2017-11-10'
fixed:
- Instrumentation works with all db interactions (not just queries that materialize
relations) (solnic)
- Typo in `MissingEnv` exception message (romatr)
- version: 2.2.0
date: '2017-11-02'
added:
- Relation registry is passed as an argument to DSL blocks (in `select`, `where`,
`order` etc.), which enables syntax like `select { |r| [id, r.tasks[:title]] }`
(solnic)
- Support for self-referenced many-to-many associations (solnic)
- PG's geometric types include meta data about db types (GustavoCaso)
fixed:
- Custom schema is used correctly in command results (solnic)
- Schemas no longer finalize PKs (this is done in core schema already) (solnic)
- version: 2.1.0
date: '2017-10-23'
added:
- Support for PG's range types (v-kolesnikov)
- Support for PG's `ltree` (GustavoCaso + solnic)
- Support for the `FILTER` clause (flash-gordon)
- PG's array types will use custom types for processing members ie `ltree[]` will
use `LTree` type (solnic)
fixed:
- Schema inference works with primary keys that have custom types (ie an enum PK
column) (v-kolesnikov)
- Ruby warnings are gone (solnic)
- version: 2.0.0
date: '2017-10-18'
added:
- Support for schema plugins (flash-gordon)
- Support for auto migrations (flash-gordon)
- |-
Add DLS for describing table indexes (flash-gordon)
```ruby
schema do
indexes do
index :name, name: :unique_name, unique: true
index :props, type: :gin
index :name, name: :long_names_only, predicate: 'length(name) > 10'
index :user_id, :title, name: :composite_idx
end
end
```
- Support for composite indexes in the auto-restrictions plugin (flash-gordon)
- |-
`SQL::Gateway#call` calls a SQL function (flash-gordon)
```ruby
gateway.(:upper, 'foo') # => "FOO"
gateway.(:pg_advisory_xact_lock, 1234) # => nil
```
- |-
`SQL::Gateway#run` executes a SQL string, e.g. a DDL statement (flash-gordon)
```ruby
gateway.run('set session IntervalStyle to default')
```
- |-
`SQL::Relation#exists` joins a relation with the `EXISTS` operator (flash-gordon)
```ruby
users.exists(posts) # => users with posts
```
- |-
Support for processing a relation in batches (flash-gordon)
```ruby
users.each_batch(size: 100) do |rel|
rel.
command(:update).
call(name: users[:first_name].concat(users[:last_name])
end
```
- |-
`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)
```ruby
users.import(authors.select { first_name.concat(last_name).as(:name) })
```
- Support for `tinytext`, `text`, `mediumtext`, and `longtext data types in MySQL
(panthomakos)
- |-
The new `pg_explain` plugin for getting query plans on PostgreSQL (flash-gordon)
```ruby
users.by_pk(1).explain(format: :json, analyze: true)
```
- |-
Support for window function calls
```ruby
employees.select { [dep_no, salary, integer::avg(salary).over(partition: dep_no, order: id).as(:avg_salary)] }
```
- |-
Function result can be negated, also `ROM::SQL::Function#not` was added (flash-gordon)
```ruby
users.where { !lower(name).is('John') }
users.where { lower(name).not('John') }
```
changed:
- "[BREAKING] based on rom 4.0 now (flash-gordon + solnic)"
- "[BREAKING] `Associates` command plugin requires associations now (solnic)"
- "[BREAKING] `Command#transaction` is gone in favor of `Relation#transaction` (solnic)"
- "[BREAKING] `PG::JSONArray`, `PG::JSONBArray`, `PG::JSONHash`, and `PG::JSONBHash`
types were dropped, use `PG::JSON` and `PG::JSONB` instead (flash-gordon)"
- "[BREAKING] The `pg_hstore` extension now doesn't get loaded automatically, use
the `:extension` option to load it on config initialization (flash-gordon)"
- "`ManyToOne` no longer uses a join (solnic)"
- "`AutoCombine` and `AutoWrap` plugins were removed as this functionality is provided
by core API (solnic)"
- Foreign keys are indexed by default (flash-gordon)
- Schemas are qualified by default (solnic)
- "`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)"
fixed:
- Self-ref associations work correctly with custom FKs (solnic)
- Aliased associations with custom FKs work correctly (solnic)
- Defining a custom dataset block no longer prevents default views like `by_pk`
to be defined (solnic)
- "`Relation#group` uses canonical schema now (solnic)"
- version: 1.3.3
date: '2017-05-30'
added:
- "`Relation#lock`, row-level locking using the `SELECT FOR UPDATE` clause (flash-gordon)"
- "`get` and `get_text` methods for the `PG::JSON` type (flash-gordon)"
- |-
Support for converting data type with `CAST` using the function DSL (flash-gordon)
```ruby
users.select { string::cast(id, 'varchar').as(:id_str) }
```
- |-
Support for`EXISTS` (v-kolesnikov)
```ruby
subquery = tasks.where(tasks[:user_id].qualified => users[:id].qualified)
users.where { exists(subquery) }
```
fixed:
- Fixed a regression introduced in v1.3.2 caused by doing way more work processing
the default dataset (flash-gordon)
- version: 1.3.2
date: '2017-05-13'
added:
- Support for filtering with a SQL function in the `WHERE` clause. Be sure you're
using it wisely and don't call it on large datasets ;) (flash-gordon)
- "`Void` type for calling functions without returning value (flash-gordon)"
- Support for [`PG::Array` transformations and queries](https://github.com/rom-rb/rom-sql/blob/15019a40e2cf2a224476184c4cddab4062a2cc01/lib/rom/sql/extensions/postgres/types.rb#L23-L148)
(flash-gordon)
fixed:
- A bunch of warnings from Sequel 4.46
- version: 1.3.1
date: '2017-05-05'
changed:
- "[internal] Compatibility with `dry-core` v0.3.0 (flash-gordon)"
- version: 1.3.0
date: '2017-05-02'
added:
- New `Relation#exist?` predicate checks if the relation has at least one tuple
(flash-gordon)
- Support for [JSONB transformations and queries](https://github.com/rom-rb/rom-sql/blob/15019a40e2cf2a224476184c4cddab4062a2cc01/lib/rom/sql/extensions/postgres/types.rb#L170-L353)
using native DSL (flash-gordon)
- Add `ROM::SQL::Attribute#not` for negated boolean equality expressions (AMHOL)
- Add `ROM::SQL::Attribute#!` for negated attribute's sql expressions (solnic)
- Inferrer gets limit constraints for string data types and stores them in type's
meta (v-kolesnikov)
fixed:
- Fixed usage of PostgreSQL's commands with a composite relation (flash-gordon)
- Translation of `true/false/nil` equality checks to `is/is not` SQL statements
in `ROM::SQL::Attribute#is` (AMHOL)
- "`associates` command plugin coerces parent collections to hashes correctly (aarek+solnic)"
- "`by_pk` works correctly even when PK is not projected (solnic)"
changed:
- |-
Global private interface `SQL::Gateway.instance` has been deprecated. Now if you run migrations
with ROM you should set up a ROM config in the `db:setup` task with something similar to
```ruby
namespace :db
task :setup do
ROM::SQL::RakeSupport.env = ROM::Configuration.new(:sql, ENV['DATABASE_URL'])
end
end
```
- version: 1.2.2
date: '2017-03-25'
changed:
- Updated `dry-initializer` (flash-gordon)
- version: 1.2.1
date: '2017-03-09'
fixed:
- Allow for joining by a `RelationProxy` instance from `rom-repository` (davydovanton)
- version: 1.2.0
date: '2017-03-07'
added:
- Support for configuring multiple associations for a command (solnic)
- Support for passing parent tuple(s) as `parent` option in `Command#with_association`
(solnic)
- Support for join using assocation name (flash-gordon)
- version: 1.1.2
date: '2017-03-02'
fixed:
- Fix grouping by a function in the block DSL (flash-gordon)
- version: 1.1.1
date: '2017-03-01'
fixed:
- Restriction conditions with an array as a value are handled correctly by attribute
types (solnic)
- version: 1.1.0
date: '2017-03-01'
added:
- Added inferring for database indices (flash-gordon)
- Restriction conditions are now coerced using schema attributes (solnic)
- "`:instrumentation` relation plugin that can be configured with any instrumentation
backend (solnic)"
- "`:auto_restrictions` relation plugin, which defines `by_*` views restricting
relations by their indexed attributes (solnic)"
fixed:
- Missing `group` method was added to legacy `SequelAPI` module (solnic)
- Associations properly maintain `order` if it was set (solnic)
- version: 1.0.3
date: '2017-02-23'
changed:
- "`AutoCombine#preload` uses better restriction for `ManyToOne` association which
greatly speeds up loading bigger amounts of data (solnic + flash-gordon)"
fixed:
- Fix the usage of timestamp in command chains (cflipse)
- version: 1.0.2
date: '2017-02-16'
added:
- Support for selecting literal strings via `` select { `'foo'`.as(:bar) } `` (solnic)
- version: 1.0.1
date: '2017-02-09'
added:
- Support for inferring the PostgreSQL `hstore` data type (flash-gordon)
- Support for the rest of geometric PostgreSQL data types (box, lseg, polygon, etc.)
(Morozzzko)
- Added inferring for timestamp types with specified precision (flash-gordon)
- Added `ROM::SQL::Attribute#in` to support range checks in conditions (flash-gordon)
fixed:
- Missing primary key now leads to a more meaningful error (flash-gordon)
- version: 1.0.0
date: '2017-01-29'
summary: 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.
added:
- "[BREAKING] All relations have schemas (inferred by default, but still possible
to override and/or extend) (solnic)"
- "[BREAKING] Schemas are used when defining relation views (solnic)"
- "[BREAKING] Default dataset is set up based on schema (solnic)"
- Extended query API with support for schema attributes (solnic)
- Schemas can project relations automatically (solnic)
- New `Schema#qualified` (solnic)
- New `Relation#assoc` method which is a shortcut for accessing relation created
by the given association (solnic)
- Schema attribute types are now SQL-specific and compatible with query DSL (ie
you can pass relation attributes to `select` and they will be automatically converted
to valid SQL expressions) (solnic)
- Associations support setting custom `view` that will be used to extend association
relation (solnic)
- Associations support setting custom `foreign_key` names (solnic)
- Update commands has `:associates` plugin enabled (solnic)
- Support for self-referencing associations (ie categories have_many child categories)
(solnic)
- Inferrers for mysql and sqlite were added (flash-gordon)
- PG's auto-inferrer can handle `inet`/`cidr`/`point` data types in a two-way manner,
i.e. converting them back and forth on reading and writing (flash-gordon)
- 'Support for inferring more PG types: `macaddr`, `xml` (flash-gordon)'
- "`ROM::SQL::Relation::SequelAPI` extension for backward-compatible query API (this
will be deprecated in 1.1.0 and removed in 2.0.0) (solnic)"
- Added `Object` type for `SQLite` which is used by the inferrer for columns without
a type affinity (flash-gordon)
- Support for composite PKs in the default `by_pk` view (solnic)
changed:
- "[BREAKING] `Relation#header` has been removed in favor of schemas (solnic)"
- "[BREAKING] `Relation#base` has been removed as now a vanilla relation _is a base
relation view_ (solnic)"
- "[BREAKING] Deprecated `Relation.primary_key` has been removed in favor of schema
(solnic)"
- "[BREAKING] Deprecated `Commands::Update#change` has been removed (solnic)"
- "[BREAKING] Deprecated `Commands.validator` has been removed (solnic)"
- "[BREAKING] `assoc_macros` plugin has been removed, please use associations from
now (solnic)"
- Default `by_pk` uses schema attributes, it will raise exception if PK attribute
is missing in the schema (solnic)
- "[internal] Associations use schemas for relation projections (solnic)"
- "[internal] `select`, `select_append`, `project`, `inner_join` and `left_join`
use schemas internally (solnic)"
- "[internal] Deprecation and constants are now based on dry-core (flash-gordon)"
- version: 0.9.1
date: '2016-12-23'
added:
- Support for PG enums in schema inferrer (flash-gordon)
- "`ROM::SQL::Relation#read` method which accepts an SQL string and returns a new
relation (solnic)"
- version: 0.9.0
date: '2016-11-08'
added:
- "`Associations::{OneToMany,OneToOne}#associate` for merging FKs into child tuple
(jodosha)"
- 'Added support for PostgreSQL types: UUID, Array, JSONB and Money (jodosha)'
- Support for DB specific schema inferrers (flash-gordon)
- Automatically infer PG arrays and JSON(B) types (jodosha + flash-gordon)
- Support for `Relation#having` (cflipse)
changed:
- Inferred types in schemas **are no longer strict** (flash-gordon)
- PG-specific types are handled by `:postgres` extension and it loads connection
extensions automatically (flash-gordon)
- Make `OneToOne` inherit from `OneToMany` (beauby)
- Default dataset will use column names from schema if it's available (solnic)
fixed:
- Floats are inferred by schemas (cflipse)
- version: 0.8.0
date: '2016-07-27'
added:
- Support for relation schemas with SQL-specific data types (solnic + flash-gordon)
- One-To-Many support in schemas (solnic + flash-gordon)
- One-To-One support in schemas (solnic + flash-gordon)
- One-To-One-Through support in schemas (solnic + flash-gordon)
- Many-To-One support in schemas (solnic + flash-gordon)
- Many-To-Many support in schemas (solnic + flash-gordon)
- Support for `has_many`, `has_one` and `belongs_to` convenient methods in schema
DSL (solnic)
- 'Support for custom PG types: `Types::PG::Array`, `Types::PG::Hash`, `Types::PG::JSON`,
and `Types::PG::Bytea` (solnic + flash-gordon)'
- Optional automatic schema inference for attributes and foreign keys based on DB
metadata provided by Sequel (flash-gordon)
- Support for arbitrary dataset and FK names in schemas (flash-gordon)
- Support for native upserts in PostgreSQL >= 9.5 via `Commands::Postgres::Upsert`
(gotar + flash-gordon)
changed:
- "`Create` and `Update` commands have `:schema` plugin enabled by default which
sets input handler based on schema definition automatically (solnic)"
- "`associates` command plugin uses schema associations now (solnic)"
- Dropped MRI 2.0.x support
fixed:
- "`Create` command properly materialize result when `:one` is set (AMHOL)"
- version: 0.7.0
date: '2016-01-06'
added:
- |-
Repository plugins have been imported:
- `view` allows defining a relation view with an explicit header (solnic)
- `base_view` defines a base view with all column names as the header (solnic)
- `auto_combine` defines a generic `for_combine` method which eager-loads
parent/children relation (solnic)
- `auto-wrap` defines a generic `for_wrap` method which inner-joins
a parent/children relation (solnic)
- Possibility to check for pending migrations (gotar)
- "`Relation#sum` interface (gotar)"
- "`Relation#avg` interface (gotar)"
- "`Relation#min` interface (gotar)"
- "`Relation#max` interface (gotar)"
- "`Relation#union` interface (spscream)"
- |-
`primary_key` macro which allows setting a custom primary key when it cannot be
inferred automatically (solnic)
changed:
- "`ROM::SQL.gateway` renamed to `ROM::SQL::Gateway.instance` for migrations (endash)"
- Association macros are now an optional plugin (solnic)
- version: 0.6.1
date: '2015-09-23'
added:
- "`Gateway` accepts `:extensions` as an option (c0)"
- version: 0.6.0
date: '2015-08-19'
summary: Internal updates to fix deprecation warnings from ROM 0.9.0.
- version: 0.5.3
date: '2015-07-23'
added:
- "`Relation#multi_insert` (draxxxeus)"
changed:
- Command that receives many tuples will use `multi_insert` now (draxxxeus)
fixed:
- Relation name and join key fixes for `many_to_one` macro (jamesmoriarty)
- version: 0.5.2
date: '2015-06-22'
added:
- "`Relation#invert` operation (nepalez)"
changed:
- Migration tasks no longer require entire ROM env (solnic)
- "`Repository` => `Gateway` rename for ROM 0.8.0 compatibility (solnic)"
- version: 0.5.1
date: '2015-05-25'
changed:
- Relations won't be finalized when table(s) is/are missing (solnic)
fixed:
- Wrap errors when calling commands with `[]`-syntax (kwando)
- version: 0.5.0
date: '2015-05-22'
added:
- Association macros support addition `:on` option (solnic)
- "`associates` plugin for `Create` command (solnic)"
- Support for NotNullConstraintError (solnic)
- Support for UniqueConstraintConstraintError (solnic)
- Support for ForeignKeyConstraintError (solnic)
- Support for CheckConstraintError (solnic)
- "`Commands::Update#original` supports objects coercible to_h now (solnic)"
changed:
- |-
[BREAKING] Constraint errors are no longer command errors which means `try` and
`transaction` blocks will not catch them (solnic)
- "`Commands::Update#set` has been deprecated (solnic)"
- "`Commands::Update#to` has been deprecated (solnic)"
- version: 0.4.3
date: '2015-05-17'
fixed:
- "`transaction` doesn't swallow errors now other than CommandError (solnic)"
- version: 0.4.2
date: '2015-05-17'
added:
- Support for setting custom association name (solnic)
- Support for `:conditions` option in association definition (solnic)
- Better error message when accessing undefined associations (pdswan)
fixed:
- |-
Correct `ROM::SQL::Plugin::Pagination::Pager#total_pages` when total is not
evenly divisible by page size (larribas)
- "`association_join` behaves correctly when dataset is different than register_as
(nepalez)"
changed:
- "`transaction` returns command failure objects when there was a rollback (solnic)"
- version: 0.4.1
date: '2015-04-04'
added:
- Database error handling for update and delete commands (kwando + solnic)
- Migration interface as a repository plugin (gotar + solnic)
- version: 0.4.0
date: '2015-03-22'
added:
- "`ROM::SQL::Relation` which explictly defines an interface on top of Sequel (solnic
+ mcls)"
- Postgres-specific Create and Update commands that support RETURNING (gotar + solnic)
- "`Update#change` interface for skipping execution when there's no diff (solnic)"
- Experimental migration API using sequel/migrations (gotar)
- Pagination plugin (solnic)
- Allow reuse of established Sequel connections (splattael)
changed:
- Use ROM's own inflector which uses either ActiveSupport or Inflecto backends (mjtko)
fixed:
- Indentation in Rails logger (morgoth)
- version: 0.3.2
date: '2015-01-01'
fixed:
- Checking tuple count in commands (solnic)
- version: 0.3.1
date: '2014-12-31'
added:
- "`Adapter#disconnect` (solnic)"
- Support for extra connection options (solnic)
- version: 0.3.0
date: '2014-12-19'
changed:
- "`association_join` now uses Sequel's `graph` interface which qualifies columns
automatically (solnic)"
- Delete command returns deleted tuples (solnic)
- version: 0.2.0
date: '2014-12-06'
added:
- Command API (solnic)
- Support for ActiveSupport::Notifications with a log subscriber (solnic)
- New `ROM::SQL::Adapter#dataset?(name)` checking if a given table exists (solnic)
- version: 0.1.1
date: '2014-11-24'
fixed:
- Equalizer in header (solnic)
changed:
- minor refactor in adapter (solnic)
- version: 0.1.0
date: '2014-11-24'
summary: First release powered by Sequel