File: 5.52.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 (87 lines) | stat: -rw-r--r-- 3,047 bytes parent folder | download | duplicates (2)
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
= New Features

* When the sql_comments Database extension is used,
  Database#with_comments is now added, which can be used for including
  comments for all queries executed inside a given block.  This can
  be useful if you want to analyze database query logs, and want to
  group all related queries:

     DB.with_comments(model: Album, action: :all) do
       DB[:albums].all
       # SELECT * FROM albums -- model:Album,action:all
    end

* An sql_comments plugin has been added, which will automatically
  add SQL comments for all queries generated by model class, instance
  and dataset methods:

    Album.plugin :sql_comments

    album = Album[1]
    # SELECT * FROM albums WHERE (id = 1) LIMIT 1
    # -- model:Album,method_type:class,method:[]

    album.update(:name=>'A')
    # UPDATE albums SET name = 'baz' WHERE (id = 1)
    # -- model:Album,method_type:instance,method:update

    Album.where(id: 1).delete
    # DELETE FROM albums WHERE (id = 1)
    # -- model:Album,method_type:dataset,method:delete

  This plugin requires you have loaded the sql_comments Database
  extension into the related Database before use.

* A date_parse_input_handler extension has been added to support
  custom handling of input to date parsing methods.  Among other
  things, you can use this to limit the length of strings that
  will be parsed, which can prevent ArgumentErrors in newer Ruby
  versions:

    Sequel.extension :date_parse_input_handler
    Sequel.date_parse_input_handler do |string|
      string.b[0, 128]
    end

= Other Improvements

* On Ruby 3.1, the core_refinements extension now avoids the
  deprecated Refinement#include, switching to
  Refinement#import_methods.

* On Ruby 3.1, the subclasses plugin will use Ruby's native support
  for Class#subclasses.

* The subclasses plugin has renamed descendents to descendants and
  freeze_descendents to freeze_descendants.  The previous method
  names are still available as aliases.

* The :ruby_default schema entry for datetime/timestamp columns now
  respects Sequel.datetime_class.  Previously, the value for the
  :ruby_default schema entry would always be a DateTime value for
  such columns.

* The pg_interval extension now works with ActiveSupport 7.0.

* The shared postgres adapter now respects
  Database#default_string_column_size for setting the size of string
  columns that don't use text as the database type.

* Database#supports_check_constraints? now returns true on MySQL
  8.0.19+. This fixes drop_constraint in certain cases when combining
  the constraint dropping with other changes in the same alter_table
  block.

* The mysql adapter now supports the ruby-mysql 3 API (ruby-mysql
  is a pure-ruby MySQL driver).

* The mysql adapter no longer uses the connection's server_version
  method if it is defined, as the method does not return the
  correct value when using the ruby-mysql driver with MariaDB.

* Comments added by the sql_comments extension no longer modify
  cached SQL for a dataset.

= Other

* This is Sequel's 250th release!