sequel 4.13.0 → 4.14.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (117) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG +24 -0
  3. data/doc/active_record.rdoc +4 -4
  4. data/doc/advanced_associations.rdoc +2 -2
  5. data/doc/association_basics.rdoc +11 -11
  6. data/doc/cheat_sheet.rdoc +7 -7
  7. data/doc/core_extensions.rdoc +1 -1
  8. data/doc/dataset_filtering.rdoc +1 -1
  9. data/doc/extensions.rdoc +1 -1
  10. data/doc/migration.rdoc +3 -3
  11. data/doc/model_hooks.rdoc +1 -1
  12. data/doc/opening_databases.rdoc +4 -0
  13. data/doc/postgresql.rdoc +2 -2
  14. data/doc/prepared_statements.rdoc +1 -1
  15. data/doc/querying.rdoc +31 -31
  16. data/doc/release_notes/4.13.0.txt +1 -1
  17. data/doc/release_notes/4.14.0.txt +68 -0
  18. data/doc/schema_modification.rdoc +1 -1
  19. data/doc/sharding.rdoc +2 -2
  20. data/doc/sql.rdoc +1 -1
  21. data/doc/virtual_rows.rdoc +2 -2
  22. data/lib/sequel/adapters/jdbc/jtds.rb +4 -0
  23. data/lib/sequel/adapters/mysql.rb +18 -18
  24. data/lib/sequel/adapters/mysql2.rb +7 -7
  25. data/lib/sequel/adapters/shared/mysql.rb +15 -5
  26. data/lib/sequel/adapters/shared/postgres.rb +71 -58
  27. data/lib/sequel/adapters/shared/sqlite.rb +2 -2
  28. data/lib/sequel/ast_transformer.rb +1 -1
  29. data/lib/sequel/connection_pool/sharded_single.rb +8 -8
  30. data/lib/sequel/connection_pool/sharded_threaded.rb +8 -8
  31. data/lib/sequel/database/connecting.rb +1 -1
  32. data/lib/sequel/database/schema_generator.rb +12 -0
  33. data/lib/sequel/database/schema_methods.rb +8 -7
  34. data/lib/sequel/database/transactions.rb +1 -2
  35. data/lib/sequel/dataset/actions.rb +4 -4
  36. data/lib/sequel/dataset/graph.rb +4 -0
  37. data/lib/sequel/dataset/query.rb +18 -18
  38. data/lib/sequel/dataset/sql.rb +3 -3
  39. data/lib/sequel/extensions/_pretty_table.rb +1 -0
  40. data/lib/sequel/extensions/arbitrary_servers.rb +3 -2
  41. data/lib/sequel/extensions/columns_introspection.rb +1 -0
  42. data/lib/sequel/extensions/connection_validator.rb +1 -0
  43. data/lib/sequel/extensions/constraint_validations.rb +1 -0
  44. data/lib/sequel/extensions/current_datetime_timestamp.rb +1 -0
  45. data/lib/sequel/extensions/dataset_source_alias.rb +1 -0
  46. data/lib/sequel/extensions/date_arithmetic.rb +1 -0
  47. data/lib/sequel/extensions/empty_array_ignore_nulls.rb +1 -0
  48. data/lib/sequel/extensions/error_sql.rb +1 -0
  49. data/lib/sequel/extensions/eval_inspect.rb +1 -0
  50. data/lib/sequel/extensions/filter_having.rb +1 -0
  51. data/lib/sequel/extensions/from_block.rb +1 -0
  52. data/lib/sequel/extensions/graph_each.rb +1 -0
  53. data/lib/sequel/extensions/hash_aliases.rb +1 -0
  54. data/lib/sequel/extensions/looser_typecasting.rb +1 -0
  55. data/lib/sequel/extensions/meta_def.rb +1 -0
  56. data/lib/sequel/extensions/migration.rb +1 -0
  57. data/lib/sequel/extensions/mssql_emulate_lateral_with_apply.rb +1 -0
  58. data/lib/sequel/extensions/named_timezones.rb +1 -0
  59. data/lib/sequel/extensions/null_dataset.rb +1 -0
  60. data/lib/sequel/extensions/pagination.rb +1 -0
  61. data/lib/sequel/extensions/pg_array.rb +2 -2
  62. data/lib/sequel/extensions/pg_array_ops.rb +1 -0
  63. data/lib/sequel/extensions/pg_enum.rb +1 -0
  64. data/lib/sequel/extensions/pg_hstore_ops.rb +1 -0
  65. data/lib/sequel/extensions/pg_json_ops.rb +1 -0
  66. data/lib/sequel/extensions/pg_loose_count.rb +1 -0
  67. data/lib/sequel/extensions/pg_range_ops.rb +1 -0
  68. data/lib/sequel/extensions/pg_row_ops.rb +1 -0
  69. data/lib/sequel/extensions/pg_static_cache_updater.rb +1 -0
  70. data/lib/sequel/extensions/pretty_table.rb +1 -0
  71. data/lib/sequel/extensions/query.rb +1 -0
  72. data/lib/sequel/extensions/query_literals.rb +1 -0
  73. data/lib/sequel/extensions/schema_caching.rb +1 -0
  74. data/lib/sequel/extensions/schema_dumper.rb +1 -1
  75. data/lib/sequel/extensions/select_remove.rb +1 -0
  76. data/lib/sequel/extensions/sequel_3_dataset_methods.rb +1 -0
  77. data/lib/sequel/extensions/server_block.rb +1 -0
  78. data/lib/sequel/extensions/set_overrides.rb +1 -0
  79. data/lib/sequel/extensions/split_array_nil.rb +1 -0
  80. data/lib/sequel/extensions/thread_local_timezones.rb +1 -0
  81. data/lib/sequel/extensions/to_dot.rb +1 -0
  82. data/lib/sequel/model/associations.rb +5 -5
  83. data/lib/sequel/model/base.rb +3 -3
  84. data/lib/sequel/plugins/association_proxies.rb +1 -1
  85. data/lib/sequel/plugins/caching.rb +8 -3
  86. data/lib/sequel/plugins/class_table_inheritance.rb +20 -11
  87. data/lib/sequel/plugins/composition.rb +18 -18
  88. data/lib/sequel/plugins/json_serializer.rb +3 -3
  89. data/lib/sequel/plugins/lazy_attributes.rb +23 -9
  90. data/lib/sequel/plugins/many_through_many.rb +21 -21
  91. data/lib/sequel/plugins/nested_attributes.rb +7 -3
  92. data/lib/sequel/plugins/pg_row.rb +1 -1
  93. data/lib/sequel/plugins/rcte_tree.rb +13 -13
  94. data/lib/sequel/plugins/sharding.rb +6 -6
  95. data/lib/sequel/plugins/timestamps.rb +4 -4
  96. data/lib/sequel/plugins/touch.rb +7 -7
  97. data/lib/sequel/plugins/tree.rb +1 -1
  98. data/lib/sequel/plugins/validation_class_methods.rb +36 -36
  99. data/lib/sequel/plugins/validation_helpers.rb +3 -4
  100. data/lib/sequel/plugins/xml_serializer.rb +29 -29
  101. data/lib/sequel/sql.rb +22 -11
  102. data/lib/sequel/version.rb +1 -1
  103. data/spec/adapters/postgres_spec.rb +10 -0
  104. data/spec/core/database_spec.rb +3 -4
  105. data/spec/core/dataset_spec.rb +16 -1
  106. data/spec/core/expression_filters_spec.rb +12 -0
  107. data/spec/core/object_graph_spec.rb +5 -0
  108. data/spec/core/placeholder_literalizer_spec.rb +8 -0
  109. data/spec/extensions/caching_spec.rb +18 -0
  110. data/spec/extensions/class_table_inheritance_spec.rb +34 -0
  111. data/spec/extensions/many_through_many_spec.rb +4 -0
  112. data/spec/extensions/nested_attributes_spec.rb +59 -4
  113. data/spec/extensions/pg_array_associations_spec.rb +5 -0
  114. data/spec/extensions/single_table_inheritance_spec.rb +23 -1
  115. data/spec/integration/plugin_test.rb +17 -0
  116. data/spec/model/eager_loading_spec.rb +8 -0
  117. metadata +4 -2
@@ -187,7 +187,7 @@ module Sequel
187
187
  # Array of symbols specifying the table names in the current database.
188
188
  #
189
189
  # Options:
190
- # * :server - Set the server to use.
190
+ # :server :: Set the server to use.
191
191
  def tables(opts=OPTS)
192
192
  tables_and_views(TABLES_FILTER, opts)
193
193
  end
@@ -207,7 +207,7 @@ module Sequel
207
207
  # Array of symbols specifying the view names in the current database.
208
208
  #
209
209
  # Options:
210
- # * :server - Set the server to use.
210
+ # :server :: Set the server to use.
211
211
  def views(opts=OPTS)
212
212
  tables_and_views(VIEWS_FILTER, opts)
213
213
  end
@@ -69,7 +69,7 @@ module Sequel
69
69
  when SQL::JoinClause
70
70
  SQL::JoinClause.new(o.join_type, v(o.table_expr))
71
71
  when SQL::DelayedEvaluation
72
- SQL::DelayedEvaluation.new(lambda{v(o.callable.call)})
72
+ SQL::DelayedEvaluation.new(lambda{|ds| v(o.call(ds))})
73
73
  when SQL::Wrapper
74
74
  SQL::Wrapper.new(v(o.value))
75
75
  else
@@ -3,12 +3,12 @@
3
3
  class Sequel::ShardedSingleConnectionPool < Sequel::ConnectionPool
4
4
  # The single threaded pool takes the following options:
5
5
  #
6
- # * :servers - A hash of servers to use. Keys should be symbols. If not
7
- # present, will use a single :default server.
8
- # * :servers_hash - The base hash to use for the servers. By default,
9
- # Sequel uses Hash.new(:default). You can use a hash with a default proc
10
- # that raises an error if you want to catch all cases where a nonexistent
11
- # server is used.
6
+ # :servers :: A hash of servers to use. Keys should be symbols. If not
7
+ # present, will use a single :default server.
8
+ # :servers_hash :: The base hash to use for the servers. By default,
9
+ # Sequel uses Hash.new(:default). You can use a hash with a default proc
10
+ # that raises an error if you want to catch all cases where a nonexistent
11
+ # server is used.
12
12
  def initialize(db, opts=OPTS)
13
13
  super
14
14
  @conns = {}
@@ -36,8 +36,8 @@ class Sequel::ShardedSingleConnectionPool < Sequel::ConnectionPool
36
36
 
37
37
  # Disconnects from the database. Once a connection is requested using
38
38
  # #hold, the connection is reestablished. Options:
39
- # * :server - Should be a symbol specifing the server to disconnect from,
40
- # or an array of symbols to specify multiple servers.
39
+ # :server :: Should be a symbol specifing the server to disconnect from,
40
+ # or an array of symbols to specify multiple servers.
41
41
  def disconnect(opts=OPTS)
42
42
  (opts[:server] ? Array(opts[:server]) : servers).each{|s| disconnect_server(s)}
43
43
  end
@@ -7,12 +7,12 @@ Sequel.require 'connection_pool/threaded'
7
7
  # to be removed from the pool when they are returned to it.
8
8
  class Sequel::ShardedThreadedConnectionPool < Sequel::ThreadedConnectionPool
9
9
  # The following additional options are respected:
10
- # * :servers - A hash of servers to use. Keys should be symbols. If not
11
- # present, will use a single :default server.
12
- # * :servers_hash - The base hash to use for the servers. By default,
13
- # Sequel uses Hash.new(:default). You can use a hash with a default proc
14
- # that raises an error if you want to catch all cases where a nonexistent
15
- # server is used.
10
+ # :servers :: A hash of servers to use. Keys should be symbols. If not
11
+ # present, will use a single :default server.
12
+ # :servers_hash :: The base hash to use for the servers. By default,
13
+ # Sequel uses Hash.new(:default). You can use a hash with a default proc
14
+ # that raises an error if you want to catch all cases where a nonexistent
15
+ # server is used.
16
16
  def initialize(db, opts = OPTS)
17
17
  super
18
18
  @available_connections = {}
@@ -84,8 +84,8 @@ class Sequel::ShardedThreadedConnectionPool < Sequel::ThreadedConnectionPool
84
84
  #
85
85
  # Once a connection is requested using #hold, the connection pool
86
86
  # creates new connections to the database. Options:
87
- # * :server - Should be a symbol specifing the server to disconnect from,
88
- # or an array of symbols to specify multiple servers.
87
+ # :server :: Should be a symbol specifing the server to disconnect from,
88
+ # or an array of symbols to specify multiple servers.
89
89
  def disconnect(opts=OPTS)
90
90
  sync do
91
91
  (opts[:server] ? Array(opts[:server]) : @servers.keys).each do |s|
@@ -244,7 +244,7 @@ module Sequel
244
244
  # server, instead of the :default server.
245
245
  #
246
246
  # DB.synchronize do |conn|
247
- # ...
247
+ # # ...
248
248
  # end
249
249
  def synchronize(server=nil)
250
250
  @pool.hold(server || :default){|conn| yield conn}
@@ -462,6 +462,9 @@ module Sequel
462
462
  # Modify a column's default value in the DDL for the table.
463
463
  #
464
464
  # set_column_default(:artist_name, 'a') # ALTER COLUMN artist_name SET DEFAULT 'a'
465
+ #
466
+ # On MySQL, make sure to use a symbol for the name of the column, as otherwise you
467
+ # can lose the type and NULL/NOT NULL setting for the column.
465
468
  def set_column_default(name, default)
466
469
  @operations << {:op => :set_column_default, :name => name, :default => default}
467
470
  end
@@ -473,6 +476,9 @@ module Sequel
473
476
  # PostgreSQL specific options:
474
477
  #
475
478
  # :using :: Add a USING clause that specifies how to convert existing values to new values.
479
+ #
480
+ # On MySQL, make sure to use a symbol for the name of the column, as otherwise you
481
+ # can lose the default and NULL/NOT NULL setting for the column.
476
482
  def set_column_type(name, type, opts=OPTS)
477
483
  @operations << {:op => :set_column_type, :name => name, :type => type}.merge(opts)
478
484
  end
@@ -480,6 +486,9 @@ module Sequel
480
486
  # Set a given column as allowing NULL values.
481
487
  #
482
488
  # set_column_allow_null(:artist_name) # ALTER COLUMN artist_name DROP NOT NULL
489
+ #
490
+ # On MySQL, make sure to use a symbol for the name of the column, as otherwise you
491
+ # can lose the default and type for the column.
483
492
  def set_column_allow_null(name, allow_null=true)
484
493
  @operations << {:op => :set_column_null, :name => name, :null => allow_null}
485
494
  end
@@ -487,6 +496,9 @@ module Sequel
487
496
  # Set a given column as not allowing NULL values.
488
497
  #
489
498
  # set_column_not_null(:artist_name) # ALTER COLUMN artist_name SET NOT NULL
499
+ #
500
+ # On MySQL, make sure to use a symbol for the name of the column, as otherwise you
501
+ # can lose the default and type for the column.
490
502
  def set_column_not_null(name)
491
503
  set_column_allow_null(name, false)
492
504
  end
@@ -792,13 +792,14 @@ module Sequel
792
792
  # SQL DDL ON DELETE fragment to use, based on the given action.
793
793
  # The following actions are recognized:
794
794
  #
795
- # * :cascade - Delete rows referencing this row.
796
- # * :no_action (default) - Raise an error if other rows reference this
797
- # row, allow deferring of the integrity check.
798
- # * :restrict - Raise an error if other rows reference this row,
799
- # but do not allow deferring the integrity check.
800
- # * :set_default - Set columns referencing this row to their default value.
801
- # * :set_null - Set columns referencing this row to NULL.
795
+ # :cascade :: Delete rows referencing this row.
796
+ # :no_action :: Raise an error if other rows reference this
797
+ # row, allow deferring of the integrity check.
798
+ # This is the default.
799
+ # :restrict :: Raise an error if other rows reference this row,
800
+ # but do not allow deferring the integrity check.
801
+ # :set_default :: Set columns referencing this row to their default value.
802
+ # :set_null :: Set columns referencing this row to NULL.
802
803
  #
803
804
  # Any other object given is just converted to a string, with "_" converted to " " and upcased.
804
805
  def on_delete_clause(action)
@@ -128,8 +128,7 @@ module Sequel
128
128
  rescue Exception => e
129
129
  begin
130
130
  rollback_transaction(conn, opts)
131
- rescue Exception => e3
132
- raise_error(e3, :classes=>database_error_classes, :conn=>conn)
131
+ rescue Exception
133
132
  end
134
133
  transaction_error(e, :conn=>conn, :rollback=>rollback)
135
134
  ensure
@@ -461,23 +461,23 @@ module Sequel
461
461
  #
462
462
  # Examples:
463
463
  #
464
- # DB[:table].order(:id).paged_each{|row| ...}
464
+ # DB[:table].order(:id).paged_each{|row| }
465
465
  # # SELECT * FROM table ORDER BY id LIMIT 1000
466
466
  # # SELECT * FROM table ORDER BY id LIMIT 1000 OFFSET 1000
467
467
  # # ...
468
468
  #
469
- # DB[:table].order(:id).paged_each(:rows_per_fetch=>100){|row| ...}
469
+ # DB[:table].order(:id).paged_each(:rows_per_fetch=>100){|row| }
470
470
  # # SELECT * FROM table ORDER BY id LIMIT 100
471
471
  # # SELECT * FROM table ORDER BY id LIMIT 100 OFFSET 100
472
472
  # # ...
473
473
  #
474
- # DB[:table].order(:id).paged_each(:strategy=>:filter){|row| ...}
474
+ # DB[:table].order(:id).paged_each(:strategy=>:filter){|row| }
475
475
  # # SELECT * FROM table ORDER BY id LIMIT 1000
476
476
  # # SELECT * FROM table WHERE id > 1001 ORDER BY id LIMIT 1000
477
477
  # # ...
478
478
  #
479
479
  # DB[:table].order(:table__id).paged_each(:strategy=>:filter,
480
- # :filter_values=>proc{|row, exprs| [row[:id]]}){|row| ...}
480
+ # :filter_values=>proc{|row, exprs| [row[:id]]}){|row| }
481
481
  # # SELECT * FROM table ORDER BY id LIMIT 1000
482
482
  # # SELECT * FROM table WHERE id > 1001 ORDER BY id LIMIT 1000
483
483
  # # ...
@@ -36,6 +36,7 @@ module Sequel
36
36
  # the receiver is wrapped in a from_self before graphing, and this option
37
37
  # determines the alias to use.
38
38
  # :implicit_qualifier :: The qualifier of implicit conditions, see #join_table.
39
+ # :join_only :: Only join the tables, do not change the selected columns.
39
40
  # :join_type :: The type of join to use (passed to +join_table+). Defaults to :left_outer.
40
41
  # :qualify:: The type of qualification to do, see #join_table.
41
42
  # :select :: An array of columns to select. When not used, selects
@@ -103,6 +104,9 @@ module Sequel
103
104
 
104
105
  # Join the table early in order to avoid cloning the dataset twice
105
106
  ds = ds.join_table(options[:join_type] || :left_outer, table, join_conditions, :table_alias=>table_alias_qualifier, :implicit_qualifier=>implicit_qualifier, :qualify=>options[:qualify], &block)
107
+
108
+ return ds if options[:join_only]
109
+
106
110
  opts = ds.opts
107
111
 
108
112
  # Whether to include the table in the result set
@@ -67,7 +67,7 @@ module Sequel
67
67
  where(*cond, &block)
68
68
  end
69
69
 
70
- # Returns a new clone of the dataset with with the given options merged.
70
+ # Returns a new clone of the dataset with the given options merged.
71
71
  # If the options changed include options in COLUMN_CHANGE_OPTS, the cached
72
72
  # columns are deleted. This method should generally not be called
73
73
  # directly by user code.
@@ -862,18 +862,18 @@ module Sequel
862
862
  #
863
863
  # Accepts the following argument types:
864
864
  #
865
- # * Hash - list of equality/inclusion expressions
866
- # * Array - depends:
867
- # * If first member is a string, assumes the rest of the arguments
868
- # are parameters and interpolates them into the string.
869
- # * If all members are arrays of length two, treats the same way
870
- # as a hash, except it allows for duplicate keys to be
871
- # specified.
872
- # * Otherwise, treats each argument as a separate condition.
873
- # * String - taken literally
874
- # * Symbol - taken as a boolean column argument (e.g. WHERE active)
875
- # * Sequel::SQL::BooleanExpression - an existing condition expression,
876
- # probably created using the Sequel expression filter DSL.
865
+ # Hash :: list of equality/inclusion expressions
866
+ # Array :: depends:
867
+ # * If first member is a string, assumes the rest of the arguments
868
+ # are parameters and interpolates them into the string.
869
+ # * If all members are arrays of length two, treats the same way
870
+ # as a hash, except it allows for duplicate keys to be
871
+ # specified.
872
+ # * Otherwise, treats each argument as a separate condition.
873
+ # String :: taken literally
874
+ # Symbol :: taken as a boolean column argument (e.g. WHERE active)
875
+ # Sequel::SQL::BooleanExpression :: an existing condition expression,
876
+ # probably created using the Sequel expression filter DSL.
877
877
  #
878
878
  # where also accepts a block, which should return one of the above argument
879
879
  # types, and is treated the same way. This block yields a virtual row object,
@@ -1046,11 +1046,13 @@ module Sequel
1046
1046
  # SQL expression object based on the expr type. See +where+.
1047
1047
  def filter_expr(expr = nil, &block)
1048
1048
  expr = nil if expr == []
1049
+
1049
1050
  if expr && block
1050
1051
  return SQL::BooleanExpression.new(:AND, filter_expr(expr), filter_expr(block))
1051
1052
  elsif block
1052
1053
  expr = block
1053
1054
  end
1055
+
1054
1056
  case expr
1055
1057
  when Hash
1056
1058
  SQL::BooleanExpression.from_value_pairs(expr)
@@ -1064,10 +1066,8 @@ module Sequel
1064
1066
  end
1065
1067
  when Proc
1066
1068
  filter_expr(Sequel.virtual_row(&expr))
1067
- when SQL::NumericExpression, SQL::StringExpression
1068
- raise(Error, "Invalid SQL Expression type: #{expr.inspect}")
1069
- when Symbol, SQL::Expression
1070
- expr
1069
+ when Numeric, SQL::NumericExpression, SQL::StringExpression
1070
+ raise(Error, "Invalid filter expression: #{expr.inspect}")
1071
1071
  when TrueClass, FalseClass
1072
1072
  if supports_where_true?
1073
1073
  SQL::BooleanExpression.new(:NOOP, expr)
@@ -1081,7 +1081,7 @@ module Sequel
1081
1081
  when PlaceholderLiteralizer::Argument
1082
1082
  expr.transform{|v| filter_expr(v)}
1083
1083
  else
1084
- raise(Error, "Invalid filter argument: #{expr.inspect}")
1084
+ expr
1085
1085
  end
1086
1086
  end
1087
1087
 
@@ -517,11 +517,11 @@ module Sequel
517
517
 
518
518
  # Append literalization of delayed evaluation to SQL string,
519
519
  # causing the delayed evaluation proc to be evaluated.
520
- def delayed_evaluation_sql_append(sql, callable)
520
+ def delayed_evaluation_sql_append(sql, delay)
521
521
  if recorder = @opts[:placeholder_literalizer]
522
- recorder.use(sql, callable, nil)
522
+ recorder.use(sql, lambda{delay.call(self)}, nil)
523
523
  else
524
- literal_append(sql, callable.call)
524
+ literal_append(sql, delay.call(self))
525
525
  end
526
526
  end
527
527
 
@@ -6,6 +6,7 @@
6
6
  #
7
7
  # Sequel.extension :_pretty_table
8
8
 
9
+ #
9
10
  module Sequel
10
11
  module PrettyTable
11
12
  # Prints nice-looking plain-text tables via puts
@@ -33,8 +33,8 @@
33
33
  # DB.with_server(:host=>'...', :database=>'...') do
34
34
  # DB.synchronize do
35
35
  # # All of these use the host/database given to with_server
36
- # DB[:table].insert(...)
37
- # DB[:table].update(...)
36
+ # DB[:table].insert(:c=>1)
37
+ # DB[:table].update(:c=>2)
38
38
  # DB.tables
39
39
  # DB[:table].all
40
40
  # end
@@ -53,6 +53,7 @@
53
53
  # to switch to the sharded threaded connection pool before using this
54
54
  # extension.
55
55
 
56
+ #
56
57
  module Sequel
57
58
  module ArbitraryServers
58
59
  private
@@ -15,6 +15,7 @@
15
15
  #
16
16
  # DB.extension(:columns_introspection)
17
17
 
18
+ #
18
19
  module Sequel
19
20
  module ColumnsIntrospection
20
21
  # Attempt to guess the columns that will be returned
@@ -43,6 +43,7 @@
43
43
  # you are currently using a single threaded pool and want to
44
44
  # use this extension, switch to using a threaded pool.
45
45
 
46
+ #
46
47
  module Sequel
47
48
  module ConnectionValidator
48
49
  class Retry < Error; end
@@ -122,6 +122,7 @@
122
122
  # readd all constraints you want to use inside the alter table block,
123
123
  # making no other changes inside the alter_table block.
124
124
 
125
+ #
125
126
  module Sequel
126
127
  module ConstraintValidations
127
128
  # The default table name used for the validation metadata.
@@ -21,6 +21,7 @@
21
21
  #
22
22
  # DB.extension(:current_datetime_timestamp)
23
23
 
24
+ #
24
25
  module Sequel
25
26
  module CurrentDateTimeTimestamp
26
27
  module DatasetMethods
@@ -36,6 +36,7 @@
36
36
  #
37
37
  # DB.extension(:dataset_source_alias)
38
38
 
39
+ #
39
40
  module Sequel
40
41
  class Dataset
41
42
  module DatasetSourceAlias
@@ -24,6 +24,7 @@
24
24
  #
25
25
  # DB[:table].select(add.as(:d)).where(sub > Sequel::CURRENT_TIMESTAMP)
26
26
 
27
+ #
27
28
  module Sequel
28
29
  module SQL
29
30
  module Builders
@@ -20,6 +20,7 @@
20
20
  #
21
21
  # DB.extension(:empty_array_ignore_nulls)
22
22
 
23
+ #
23
24
  module Sequel
24
25
  module EmptyArrayIgnoreNulls
25
26
  # Use a simple expression that is always true or false, never NULL.
@@ -28,6 +28,7 @@
28
28
  #
29
29
  # DB.extension :error_sql
30
30
 
31
+ #
31
32
  module Sequel
32
33
  class DatabaseError
33
34
  # Get the SQL code that caused this error to be raised.
@@ -12,6 +12,7 @@
12
12
  #
13
13
  # Sequel.extension :eval_inspect
14
14
 
15
+ #
15
16
  module Sequel
16
17
  module EvalInspect
17
18
  # Special case objects where inspect does not generally produce input
@@ -14,6 +14,7 @@
14
14
  #
15
15
  # DB.extension(:filter_having)
16
16
 
17
+ #
17
18
  module Sequel
18
19
  module FilterHaving
19
20
  # Operate on HAVING clause if HAVING clause already present.
@@ -12,6 +12,7 @@
12
12
  #
13
13
  # DB.extension :from_block
14
14
 
15
+ #
15
16
  module Sequel
16
17
  module Database::FromBlock
17
18
  # If a block is given, make it affect the FROM clause:
@@ -15,6 +15,7 @@
15
15
  #
16
16
  # DB.extension(:graph_each)
17
17
 
18
+ #
18
19
  module Sequel
19
20
  module GraphEach
20
21
  # Call graph_each for graphed datasets that are not being eager graphed.