module Sequel::Plugins::PgEagerAnyTypedArray

The pg_eager_any_typed_array plugin automatically converts the predicate expressions used for eager loading from:

table.column IN (value_list)

to:

table.column = ANY(array_expr::type[])

This makes it easier to use the pg_auto_parameterize_in_array extension with the :treat_string_list_as_text_array option, when using foreign keys with non-text database types that are represented by Ruby strings, such as enum and uuid types.

Most association types that ship with Sequel have their predicate expressions converted by this plugin. Here are the exceptions:

To avoid predicate conversion for particular associations, set the :eager_loading_predicate_transform association option to nil/false.

This plugin loads the pg_array extension into the model’s Database.