File: 5.22.0.txt

package info (click to toggle)
ruby-sequel 5.63.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 10,408 kB
  • sloc: ruby: 113,747; makefile: 3
file content (48 lines) | stat: -rw-r--r-- 1,547 bytes parent folder | download | duplicates (3)
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
= New Features

* Sequel now supports Ruby 2.7+ startless ranges in filters:

    DB[:table].where(:column=>(..10))
    # SELECT * FROM table WHERE (column <= 10)

    DB[:table].where(:column=>(...10))
    # SELECT * FROM table WHERE (column < 10)

  It also supports startless, endless ranges in filters, using a
  condition that is always true:

    DB[:table].where(:column=>(nil..nil))
    # SELECT * FROM table WHERE (1 = 1)

* Sequel now supports startless ranges in the pg_range extension:

    DB.extension :pg_range

    DB[:table].insert(:column=>(..10))
    # INSERT INTO "table" ("column") VALUES ('[,10]') RETURNING "id"

    DB[:table].insert(:column=>(...10))
    # INSERT INTO "table" ("column") VALUES ('[,10)') RETURNING "id"

    DB[:table].insert(:column=>(nil..nil))
    # INSERT INTO "table" ("column") VALUES ('[,]') RETURNING "id"

* Sequel now supports a :materialized option in Dataset#with on
  PostgreSQL 12+, to control the inlining of common table expressions:

    DB[:t].with(:t, DB[:t2], :materialized=>false)
    # WITH "t" AS NOT MATERIALIZED (SELECT * FROM "t2")
    # SELECT * FROM "t"

    DB[:t].with(:t, DB[:t2], :materialized=>true)
    # WITH "t" AS MATERIALIZED (SELECT * FROM "t2")
    # SELECT * FROM "t"

= Other Improvements

* Database#primary_key_sequence now works for tables without serial
  sequences on PostgreSQL 12+.

* Dataset#multi_insert and #import with return: :primary_key option
  on Microsoft SQL Server now work correctly if the dataset uses
  a row_proc (e.g. for model datasets).