set_literalizer.rb

lib/sequel/extensions/set_literalizer.rb
Last Update: 2023-03-16 15:39:58 -0700

The set_literalizer extension allows for using Set instances in many of the same places that you would use Array instances:

DB[:table].where(column: Set.new([1, 2, 3]))
# SELECT FROM table WHERE (column IN (1, 2, 3))

To load the extension into all datasets created from a given Database:

DB.extension :set_literalizer

Related module: Sequel::Dataset::SetLiteralizer

Required files

  1. set