File: 3.14.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 (118 lines) | stat: -rw-r--r-- 4,417 bytes parent folder | download | duplicates (7)
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
= New Features

* Dataset#grep now accepts :all_patterns, :all_columns, and
  :case_insensitive options.  Previously, grep would use a case
  sensitive search where it would match if any pattern matched any
  column.  These three options give you more control over how the
  pattern matching will work:
  
    dataset.grep([:a, :b], %w'%test% foo')
    # WHERE ((a LIKE '%test%') OR (a LIKE 'foo')
    #    OR (b LIKE '%test%') OR (b LIKE 'foo'))

    dataset.grep([:a, :b], %w'%foo% %bar%', :all_patterns=>true)
    # WHERE (((a LIKE '%foo%') OR (b LIKE '%foo%'))
    #   AND ((a LIKE '%bar%') OR (b LIKE '%bar%')))

    dataset.grep([:a, :b], %w'%foo% %bar%', :all_columns=>true)
    # WHERE (((a LIKE '%foo%') OR (a LIKE '%bar%'))
    #   AND ((b LIKE '%foo%') OR (b LIKE '%bar%')))

    dataset.grep([:a, :b], %w'%foo% %bar%',
                 :all_patterns=>true,:all_columns=>true)
    # WHERE ((a LIKE '%foo%') AND (b LIKE '%foo%')
    #   AND (a LIKE '%bar%') AND (b LIKE '%bar%'))
    
    dataset.grep([:a, :b], %w'%test% foo', :case_insensitive=>true)
    # WHERE ((a ILIKE '%test%') OR (a ILIKE 'foo')
    #    OR (b ILIKE '%test%') OR (b ILIKE 'foo')) 

* When using the schema plugin, you can now provide a block to the
  create_table methods to set the schema and create the table
  in the same call:
  
    class Artist < Sequel::Model
      create_table do
        primary_key :id
        String :name
      end
    end

* The tree plugin now accepts a :single_root option, which uses a
  before_save hook to attempt to ensure that there is only a single
  root in the tree.  It also adds a Model.root method to get the
  single root of the tree.
  
* The tree plugin now adds a Model#root? instance method to check
  if the current node is a root of the tree.

* Model#save now takes a :raise_on_failure option which will
  override the object's raise_on_save_failure setting.  This makes
  it easier to get the desired behavior (raise or just return false)
  in library code without using a begin/ensure block.
  
* The Database#adapter_scheme instance method was added, which
  operates the same as the class method.
  
* Sequel now handles the literalization of OCI8::CLOB objects in
  the Oracle adapter.

= Other Improvements

* When using the timezone support, Sequel will now correctly load
  times and datetimes in standard time when the current timezone is
  in daylight time, or vice versa.  Previously, if you tried to
  to load a time or datetime in December when in July in a timezone
  that used daylight time, it would be off by an hour.

* The rcte_tree plugin now works correctly when a :conditions option
  is used.

* The single_table_inheritance plugin now works correctly when the
  class discriminator column has the same name as an existing ruby
  method (such as type).

* Database#each_server now works correctly when a connection string
  is used to connect, instead of an options hash.
  
* Model#destroy now respects the object's use_transactions setting,
  instead of always using a transaction.
  
* Model#exists? now uses a simpler and faster query.

* Sequel now handles the aggregate methods such as count and sum
  correctly on Microsoft SQL Server when using an ordered dataset
  with a clause such as DISTINCT or GROUP and without a limit.
  
* Sequel now handles rename_table correctly on Microsoft SQL Server
  when using a case sensitive collation, or when qualifying the
  table with a schema.

* Sequel now parses the schema correctly on Oracle when the same
  table name is used in multiple schemas.

* Sequel now handles OCIInvalidHandle errors when disconnecting
  in the Oracle adapter.
  
* Sequel now raises a Sequel::Error instead of an ArgumentError
  if the current or target migration version does not exist.
  
* When a mismatched number of composite keys are used in
  associations, Sequel now uses a more detailed error message.

* Significant improvements were made to the Dataset and Model
  RDoc documentation.

= Backwards Compatibility

* Model#valid? now must accept an optional options hash.

* The Model#save_failure private method was renamed to
  raise_hook_failure.
  
* The LOCAL_DATETIME_OFFSET_SECS and LOCAL_DATETIME_OFFSET constants
  have been removed from the Sequel module.
  
* Sequel now uses obj.to_json instead of JSON.generate(obj).  This
  shouldn't affect backwards compatibility, but did fix a bug in
  certain cases.