./databases/ruby-sequel, Model classes for the Sequel Database Toolkit

[ CVSweb ] [ Homepage ] [ RSS ] [ Required by ] [ Add to tracker ]

Branch: CURRENT, Version: 4.44.0, Package name: ruby22-sequel-4.44.0, Maintainer: pkgsrc-users

Sequel is a database access toolkit for Ruby. Sequel provides thread
safety, connection pooling, and a concise DSL for constructing queries
and table schemas.

Sequel makes it easy to deal with multiple records without having to
break your teeth on SQL.

This package contains model classes for Sequel that allow it to be used
as an object-relational mapping (ORM).

Required to run:

Required to build:

Master sites:

SHA1: f278c9ced89d9824518607261b3e7974f0cabd52
RMD160: f5fb9f8e5fd131be42156ad9ac848af698eb5e94
Filesize: 1388 KB

Version history: (Expand)

CVS history: (Expand)

   2017-03-11 17:43:31 by Takahiro Kambe | Files touched by this commit (3) | Package updated
Log message:
Update ruby-sequel to 4.44.0.

=== 4.44.0 (2017-03-01)

* Add where_all, where_each, where_single_value model dataset methods, optimized \ 
for frozen datasets (jeremyevans)

* Add eager method to dataset_module (jeremyevans)

* Add implicit_subquery extension, for implicitly using a subquery for datasets \ 
using raw SQL when calling dataset methods that modify SQL (jeremyevans)

* Make Dataset#from_self keep the columns from the current dataset if present \ 

* Add implicit_subquery extension, implicitly using subqueries for dataset \ 
methods if the current dataset uses raw SQL (jeremyevans)

* Make SQL::ValueList#inspect show that it is a value list (jeremyevans)

* Make LiteralString#inspect show that it is a literal string (jeremyevans)

* Make Model::Associations::AssociationReflection#inspect show reflection class \ 
and guess at association definition line (jeremyevans)

* Make SQLTime#inspect show it is an SQLTime instance, and only the time \ 
component (jeremyevans)

* Make SQL::Blob#inspect show that it is a blob, the number of bytes, and some \ 
or all of the content (jeremyevans)

* Make plugins not modify the constant namespace for the model class that uses \ 
them (jeremyevans)

* Do not modify encoding of SQL::Blob instances in force_encoding plugin \ 

* Add Model.freeze_descendents to subclasses plugin, for easier finalizing \ 
associations/freezing of descendent classes (jeremyevans)

* Add Model.finalize_associations method for finalizing associations, speeding \ 
up some association reflections methods almost 10x (jeremyevans)

* Implement Model.freeze such that it can be used in production (jeremyevans)

* Recognize another disconnect error in the jdbc/as400 adapter (perlun) (#1300)

* Correctly handle conversion of false values when typecasting PostgreSQL arrays \ 
(mistoo) (#1299)

* Raise error if the postgres adapter attempts to load an incompatible version \ 
of sequel_pg (mahlonsmith) (#1298)

* Fix jdbc adapter so basic_type_convertor_map is not shared between instances, \ 
work with Database#freeze (jeremyevans)

=== 4.43.0 (2017-02-01)

* Make jdbc/postgresql adapter work if pg_hstore extension is loaded first \ 
(jeremyevans) (#1296)

* Make prepared_statements_associations plugin work correctly on some instance \ 
specific associations (jeremyevans)

* Make prepared_statements plugin not use prepared statements in cases where it \ 
is probably slower (jeremyevans)

* Optimize Model#refresh similar to Model.with_pk (jeremyevans)

* Make Database#extension not attempt to load the same extension more than once \ 

* Implement Database#freeze such that it can be used in production (jeremyevans)

* Freeze enum_labels in the pg_enum extension (jeremyevans)

* Handle Database#type_supported? thread-safely on PostgreSQL (jeremyevans)

* Handle primary_key_sequences thread-safely on Oracle (jeremyevans)

* Handle sharding better when using mysql2 native prepared statements (jeremyevans)

* Use thread-safe incrementor for mock adapter autoid handling (jeremyevans)

* Make Model#freeze not freeze associations hash until after validating the \ 
model instance (jeremyevans)

* Make prepared_statements_associations plugin work correctly when model object \ 
explicitly specifies server to use when also using sharding plugin (jeremyevans)

* Make prepared_statements_with_pk plugin work correctly when dataset explicitly \ 
specifies server to use (jeremyevans)

* Make prepared_statements plugin work correctly when model object explicitly \ 
specifies server to use (jeremyevans)

* Make dataset_module inherited to subclasses when using the \ 
single_table_inheritance plugin (jeremyevans) (#1284)

* Support use of SQLite result codes in the jdbc-sqlite adapter, if the jdbc \ 
sqlite driver supports them (flash-gordon, jeremyevans) (#1283)

* Make timestamp migrator handle key length limitations when using MySQL with \ 
InnoDB engine and utf8mb4 charset default (jeremyevans) (#1282)
   2017-01-13 16:30:04 by Takahiro Kambe | Files touched by this commit (3) | Package updated
Log message:
Update ruby-sequel to 4.42.1.

=== 4.42.1 (2017-01-12)

* Make dataset_module inherited to subclasses when using the \ 
single_table_inheritance plugin (jeremyevans) (#1284)

=== 4.42.0 (2017-01-01)

* Handle eager load callbacks correctly for one_to_one associations with orders \ 
or offsets when window functions are not supported (jeremyevans)

* Raise Sequel::Error if using an :eager_limit dataset option when eager loading \ 
a singular association (jeremyevans)

* Replace internal uses of Dataset#select_more with #select_append to save a \ 
method call (jeremyevans)

* Make Dataset#order_append the primary method, and #order_more the alias, for \ 
similarity to #select_append and #select_more (jeremyevans)

* Replace internal uses of Dataset#filter with #where to save a method call \ 

* Do not set :auto_increment in the schema information for integer columns that \ 
are part of a composite primary key on SQLite (jeremyevans)

* Use autoincrement setting on integer primary key columns when emulating table \ 
modification methods on SQLite (thenrio, jeremyevans) (#1277, #1278)

* Make the pagination extension work on frozen datasets (jeremyevans)

* Make Dataset#server work for frozen model datasets using the sharding plugin \ 

* Make Dataset#nullify in the null_dataset extension work on frozen datasets \ 

* Make Model#set_server work when using a frozen model dataset (jeremyevans)

* Make Dataset#ungraphed work on a frozen model dataset (jeremyevans)

* Add Dataset#with_{autoid,fetch,numrows} to the mock adapter, returning cloned \ 
datasets with the setting changed (jeremyevans)

* Make looser_typecasting extension handle the strict BigDecimal parsing \ 
introduced in ruby 2.4rc1 (jeremyevans)

* Make Database#{db,opts}= in the sequel_3_dataset_methods extension raise for \ 
frozen datasets (jeremyevans)

* Speed up repeated calls to Dataset#{interval,range} for frozen datasets using \ 
a cached placeholder literalizer (jeremyevans)

* Speed up repeated calls to Dataset#get with a single argument for frozen \ 
datasets using a cached placeholder literalizer (jeremyevans)

* Speed up repeated calls to Dataset#{first,last} with arguments/blocks for \ 
frozen datasets using a cached placeholder literalizer (jeremyevans)

* Speed up repeated calls to Dataset#{avg,min,max,sum} for frozen datasets using \ 
a cached placeholder literalizer (jeremyevans)

* Cache dataset returned by Dataset#skip_locked for frozen datasets (jeremyevans)

* Cache dataset returned by Dataset#for_update for frozen datasets (jeremyevans)

* Cache dataset returned by Dataset#un{filtered,grouped,limited,ordered} for \ 
frozen datasets (jeremyevans)

* Cache dataset returned by Dataset#reverse (no args) for frozen datasets \ 

* Cache dataset returned by Dataset#invert for frozen datasets (jeremyevans)

* Speed up repeated calls to Dataset#count with an argument or block for frozen \ 
datasets using a cached placeholder literalizer (jeremyevans)

* Using :on_duplicate_columns=>:warn Database option with \ 
duplicate_columns_handler now prepends file/line to the warning message \ 

* Move identifier mangling code to identifier_mangling extension, load by \ 
default unless using :identifier_mangling=>false Database option \ 

* Allow Dataset#with_extend to accept a block and create a module with that \ 
block that the object is extended with (jeremyevans)

* Speed up repeated calls to with_pk on the same frozen model dataset using a \ 
cached placeholder literalizer (jeremyevans)

* Add dataset_module methods such as select and order that define dataset \ 
methods which support caching for frozen datasets (jeremyevans)

* Cache subset datasets if they don't use blocks or procs for frozen model \ 
datasets (jeremyevans)

* Cache intermediate dataset used in Dataset#{last,paged_each} for frozen model \ 
datasets without an order (jeremyevans)

* Cache dataset returned by Dataset#naked for frozen datasets (jeremyevans)

* Cache intermediate dataset used in Dataset#last (no args) for frozen datasets \ 

* Cache intermediate dataset used in Dataset#first (no args) and #single_record \ 
for frozen datasets (jeremyevans)

* Cache intermediate dataset used in Dataset#empty? for frozen datasets (jeremyevans)

* Cache intermediate dataset used in Dataset#count (no args) for frozen datasets \ 

* Warn if :conditions option may be unexpectedly ignored during \ 
eager_graph/association_join (jeremyevans) (#1272)

* Cache SELECT and DELETE SQL for most frozen datasets (jeremyevans)

* Freeze most SQL::Expression objects and internal state by default (jeremyevans)

* Freeze Dataset::PlaceholderLiteralizer and \ 
Dataset::PlaceholderLiteralizer::Argument instances (jeremyevans)

* Freeze most dataset opts values to avoid unintentional modification (jeremyevans)

* Add Dataset#with_convert_smallint_to_bool on DB2, returning a clone with \ 
convert_smallint_to_bool set (jeremyevans)

* Make Dataset#freeze actually freeze the dataset on ruby 2.4+ (jeremyevans)

* Avoid using instance variables other than @opts for dataset data storage \ 

* Add freeze_datasets extension, making all datasets for a given Database frozen \ 

* Refactor prepared statement internals, using opts instead of instance \ 
variables (jeremyevans)

* Model.set_dataset now operates on a clone of the dataset given instead of \ 
modifying it, so it works with frozen datasets (jeremyevans)

=== 4.41.0 (2016-12-01)

* Add Dataset#with_mssql_unicode_strings on Microsoft SQL Server, returning a \ 
clone with mssql_unicode_strings set (jeremyevans)

* Add Dataset#with_identifier_output_method, returning a clone with \ 
identifier_output_method set (jeremyevans)

* Add Dataset#with_identifier_input_method, returning a clone with \ 
identifier_input_method set (jeremyevans)

* Add Dataset#with_quote_identifiers, returning a clone with quote_identifiers \ 
set (jeremyevans)

* Add Dataset#with_extend, returning a clone extended with given modules \ 

* Add Dataset#with_row_proc, returning a clone with row_proc set (jeremyevans)

* Support use of SQL::AliasedExpressions as Model#to_json :include option keys \ 
in the json_serializer plugin (sensadrome) (#1269)

* Major improvements to type conversion in the ado adapter (vais, jeremyevans) \ 

* Avoid memory leak in ado adapter by closing result sets after yielding them \ 
(vais, jeremyevans) (#1259)

* Fix hook_class_methods plugin handling of commit hooks (jeremyevans)

* Make association dataset method correctly handle cases where key fields are \ 
nil (jeremyevans)

* Handle pure java exceptions that don't support message= when reraising the \ 
exception in the jdbc adapter (jeremyevans)

* Add support for :offset_strategy Database option on DB2, with :limit_offset \ 
and :offset_fetch values, to disable OFFSET emulation (#1254) (jeremyevans)

* Remove deprecated support for using Bignum class as a generic type (jeremyevans)
   2016-11-01 17:44:15 by Takahiro Kambe | Files touched by this commit (3) | Package updated
Log message:
Update ruby-sequel to 4.40.0.

=== 4.40.0 (2016-10-28)

* Make column_select plugin not raise an exception if the model's table does not \ 
exist (jeremyevans)

* Make dataset_associations plugin correctly handle (many|one)_through_many \ 
associations with single join table (jeremyevans) (#1253)

* Add s extension, with adds Sequel::S module that includes private #S method \ 
for calling Sequel.expr, including use as refinement (jeremyevans)

* Add symbol_as and symbol_as_refinement extensions so that :column.as(:alias) \ 
is treated as Sequel.as(:column, :alias) (jeremyevans)

* Add symbol_aref and symbol_aref_refinement extensions so that :table[:column] \ 
is treated as Sequel.qualify(:table, :column) (jeremyevans)

* Add Sequel.split_symbols=, to support the disabling of splitting symbols with \ 
double/triple underscores (jeremyevans)

* Make SQL::QualifiedIdentifier convert SQL::Identifier arguments to strings, \ 
fixing Sequel[:schema][:table] usage in schema methods (jeremyevans)

* Do not attempt to combine non-associative operators (jeremyevans) (#1246)

* Automatically add NOT NULL to columns when adding primary keys if the database \ 
doesn't handle it (jeremyevans)

* Make prepared_statements plugin correctly handle lookup on joined datasets \ 
(jeremyevans) (#1244)

* Make Database#tables with :qualify=>true option handle table names with \ 
double underscores correctly (jeremyevans) (#1241)

* Add SQL::Identifier#[] and SQL::QualifiedIdentifier#[] for creating qualified \ 
identifiers (jeremyevans)

* Add support for Dataset#insert_conflict :conflict_where option, for a \ 
predicate to use in ON CONFLICT clauses (chanks) (#1240)

* Freeze Dataset::NON_SQL_OPTIONS, add private Dataset#non_sql_options, fixing \ 
thread safety issues during require (jeremyevans)

* Make the callable returned by Database#rollback_checker thread safe (jeremyevans)

* Make lazy_attributes and dataset_associations plugins work if \ 
insert_returning_select plugin is loaded before on model with no dataset \ 
   2016-10-09 14:48:41 by Takahiro Kambe | Files touched by this commit (3) | Package updated
Log message:
Update ruby-sequel to 4.39.0.

=== 4.39.0 (2016-10-01)

* Make active_model plugin use rollback_checker instead of after_rollback hook \ 

* Add Database#rollback_checker, which returns a proc that returns whether the \ 
in progress transaction is rolled back (jeremyevans)

* Add Sequel::Database.set_shared_adapter_scheme to allow external adapters to \ 
support the mock adapter (jeremyevans)

* Make hook_class_methods plugin not use after commit/rollback model hooks \ 

* Support add_column :after and :first options on MySQL (AnthonyBobsin, \ 
jeremyevans) (#1234)

* Support ActiveSupport 5 in pg_interval extension when weeks/hours are used in \ 
ActiveSupport::Duration objects (chanks) (#1233)

* Support IntegerMigrator :relative option, for running only the specified \ 
number of migrations up or down (jeremyevans)

* Make the touch plugin also touch associations on create in addition to update \ 
and delete (jeremyevans)

* Add :allow_manual_update timestamps plugin option for not overriding a \ 
manually set update timestamp (jeremyevans)

* Add Sequel.[] as an alias to Sequel.expr, for easier expression creation \ 

* Add PostgreSQL full_text_search :to_tsquery=>:phrase option, for using \ 
PostgreSQL 9.6+ full text search phrase searching (jeremyevans)

* Add JSONBOp#insert in pg_json_ops extension, for jsonb_insert support on \ 
PostgreSQL 9.6+ (jeremyevans)

* Support add_column :if_not_exists option on PostgreSQL 9.6+ (jeremyevans)
   2016-09-10 08:24:14 by Takahiro Kambe | Files touched by this commit (3) | Package updated
Log message:
Update ruby-sequel to 4.38.0.

=== 4.38.0 (2016-09-01)

* Support :driver_options option when using the postgres adapter with pg driver \ 

* Don't use after commit/rollback database hooks if the model instance methods \ 
are not overridden (jeremyevans)

* Add SQL::NumericMethods#coerce, allowing code such as Sequel.expr{1 - x} \ 

* Support ** operator for exponentiation on expressions, similar to +, -, *, and \ 
/ (jeremyevans)

* Add Sequel::SQLTime.date= to set the date used for SQLTime instances (jeremyevans)
   2016-08-21 10:30:24 by Takahiro Kambe | Files touched by this commit (3) | Package updated
Log message:
Update ruby-sequel to 4.37.0.

=== 4.37.0 (2016-08-01)

* Add support for regular expression matching on Oracle 10g+ using REGEXP_LIKE \ 
(johndcaldwell) (#1221)

* Recognize an additional disconnect error in the postgres adapter (jeremyevans)

* Make connection pool remove connections for disconnect errors not raised as \ 
DatabaseDisconnectError (jeremyevans)

* Support mysql2 0.4+ native prepared statements and bound variables (jeremyevans)

* Add Database#values for VALUES support on SQLite 3.8.3+ (jeremyevans)

* Support create_view :columns option on SQLite 3.9.0+ (jeremyevans)

* Make migration reverser handle alter_table add_constraint using a hash as the \ 
first argument (soupmatt) (#1215)

* Make ASTTransformer handle Sequel.extract (jeremyevans) (#1213)
   2016-07-17 16:27:46 by Takahiro Kambe | Files touched by this commit (3) | Package updated
Log message:
Update ruby-sequel to 4.36.0.

=== 4.36.0 (2016-07-01)

* Deprecate use of Bignum class as generic type, since the behavior will change \ 
in ruby 2.4 (jeremyevans)

* Don't hold connection pool mutex while disconnecting connections (jeremyevans)

* Don't hold references to disconnected connections in the connection_validator \ 
extension (jeremyevans)

* Don't overwrite existing connection_validation_timeout when loading \ 
connection_validator extension multiple times (jeremyevans)

* Add connection_expiration extension, for automatically removing connections \ 
open for too long (pdrakeweb) (#1208, #1209)

* Handle disconnection errors raised during string literalization in mysql2 and \ 
postgres adapters (jeremyevans)

* Add string_agg extension for aggregate string concatenation support on many \ 
databases (jeremyevans)

* Add SQL::Function#order for ordered aggregate functions (jeremyevans)

* Support operator validation in constraint_validations for <, <=, >, \ 
and >= operators with string and integer arguments (jeremyevans)

* Make validates_operator validation consider nil values invalid unless \ 
:allow_nil or similar option is used (jeremyevans)

* Close cursors for non-SELECT queries in the oracle adapter after execution, \ 
instead of waiting until GC (jeremyevans) (#1203)

* Add :class_namespace association option for setting default namespace for \ 
:class option given as symbol/string (jeremyevans)

* Add Sequel::Model.cache_anonymous_models accessor for changing caching on a \ 
per-model basis (jeremyevans)

* Add Sequel::Model.def_Model for adding a Model() method to a module, for \ 
easier use of namespaced models (jeremyevans)

* Add Sequel::Model::Model() for creating subclasses of Sequel::Model \ 
subclasses, instead of just Sequel::Model itself (jeremyevans)

=== 4.35.0 (2016-06-01)

* Add :headline option to PostgreSQL Dataset#full_text_search for adding an \ 
extract of the matched text to the SELECT list (jeremyevans)

* Make :rollback=>:always inside a transaction use a savepoint automatically \ 
if supported (jeremyevans) (#1193)

* Recognize bool type as boolean in the schema dumper (jeremyevans) (#1192)

* Make Dataset#to_hash and #to_hash_groups work correctly for model datasets \ 
doing eager loading (jeremyevans)

* Make delay_add_association plugin handle hashes and primary keys passed to \ 
add_* association methods (jeremyevans) (#1187)

* Treat :Bignum as a generic type, to support 64-bit integers on ruby 2.4+, \ 
where Bignum == Integer (jeremyevans)

* Add server_logging extension for including server/shard information when \ 
logging queries (jeremyevans)

* Add Database#log_connection_info, for including connection information when \ 
logging queries (jeremyevans)

* Add Dataset#skip_locked for skipping locked rows on PostgreSQL 9.5+, MSSQL, \ 
and Oracle (jeremyevans)

* Allow Sequel::Model#lock! to accept an optional lock style (petedmarsh) (#1183)

* Add sql_comments extension for setting SQL comments on queries (jeremyevans)

* Make Postgres::PGRange#cover? handle empty, unbounded, and exclusive beginning \ 
ranges (jeremyevans)

* Fix frozen string literal issues on JRuby (jeremyevans)

* Allow json_serializer :include option with cascaded values to work correctly \ 
when used with association_proxies (jeremyevans)

=== 4.34.0 (2016-05-01)

* Add support for :dataset_associations_join association option to \ 
dataset_associations plugin, for making resulting datasets have appropriate \ 
joins (jeremyevans)

* Log server connection was attempted to in PoolTimeout exception messages in \ 
sharded connection pool (jeremyevans)

* Log Database :name option in PoolTimeout exception messages (bigkevmcd, \ 
jeremyevans) (#1176)

* Add duplicate_columns_handler extension, for raising or warning if a dataset \ 
returns multiple columns with the same name (TSMMark, jeremyevans) (#1175)

* Support registering per-Database custom range types in the pg_range extension \ 
(steveh) (#1174)

* Support :preconnect=>:concurrently Database option for preconnecting in \ 
separate threads (kch, jeremyevans) (#1172)

* Make prepared_statements_safe plugin work correctly with \ 
CURRENT_DATE/CURRENT_TIMESTAMP defaults (jeremyevans) (#1168)

* Add validates_operator validation helper (petedmarsh) (#1170)

* Recognize additional unique constraint violation on Microsoft SQL Server \ 

* Add :hash option to Dataset#(select|to)_hash(_groups)? methods for choosing \ 
object to populate (mwpastore) (#1167)
   2016-04-09 15:42:09 by Wen Heping | Files touched by this commit (3) | Package updated
Log message:
Update to 4.33.0

Upstream changes:

Last Update: 2016-04-01 07:24:12 -0700
New Features

    A Sequel::Model.require_valid_table accessor has been added. This setting is \ 
false for backwards compatibility, but if set to true, will raise an error you \ 
try to create a model class where an invalid table name is used or the schema or \ 
columns cannot be determined. This makes it easier to catch bugs, as things will \ 
fail fast, but it means that you must change code like:

    class Foo < Sequel::Model
      set_dataset :my_foos


    class Foo < Sequel::Model(:my_foos)

    as otherwise Foo will attempt to use the foos table by default when creating \ 
the class, which will raise an error as it is not the correct table name.

    Sequel::Database#transaction now supports a :savepoint=>:only option, \ 
which will create a savepoint if already inside a transaction, but will yield \ 
without creating a transaction if not inside a transaction. The use case for \ 
this is when you are running code that may raise an exception, and you don't \ 
want to invalidate the current transaction state.

Other Improvements

    The graph_each extension now splits results into subhashes when using \ 
Sequel::Dataset#first, as it did before Sequel 4.27.0.

    On PostgreSQL, Dataset#insert_conflict now accepts an array of columns as \ 
the value for the :target option.

    You can now pass a Sequel::SQL::Identifier or a \ 
Sequel::SQL::QualifiedIdentifer as the table argument when creating a foreign \ 
key. Previously, only symbols were supported, and using other values required \ 
specifying the :table option. So this will now work to reference a table that \ 
includes a double underscore:

    foreign_key :foo_id, Sequel.identifier(:fo__oo)

    Creating model classes inside a transaction on PostgreSQL where the implicit \ 
table name isn't correct no longer causes the transaction to fail.

    Similar issues were also fixed in the boolean_readers, boolean_subsets, and \ 
class_table_inheritance plugins.

    On PostgreSQL, You can now use the :qualify=>true option in the schema \ 
dumper, to dump using schema-qualified table names.

    On Microsoft SQL Server, the set_column_allow_null and set_column_not_null \ 
alter table methods now work on varchar(max), text, and similar columns.

    On Oracle, Sequel::Database#sequence_for_table now returns nil if given a \ 
table that doesn't exist or that the user does not have access to.

    Passing arbitrary objects to a model association method now indicates that \ 
the association should be reloaded, which was used to work but was broken in \ 
Sequel 4.32.0.

    It is now possible to raise Sequel::ValidationFailed and Sequel::HookFailed \ 
without an argument.

Backwards Compatibility

    Sequel::Model no longer swallows many errors when subclassing or setting \ 
datasets. While this should hopefully not affect backwards compatibility, it may \ 
break things where the methods were raising exceptions. If this does break \ 
backwards compatibility, it is most likely because it is no longer hiding \ 
another bug that should be fixed. Specific changes include:

        Model.inherited no longer rescues exceptions raised by set_dataset

        When subclassing a model that has a dataset, the columns and schema are \ 
just copied from the superclass

        Only Sequel::Error is rescued in calls to columns and schema, before it \ 
would rescue StandardError.

    The Sequel.firebird and Sequel.informix adapter methods have been removed, \ 
they are no longer needed as the firebird and informix adapters were removed a \ 
few versions back.