Sha256: b883fadcbe24b45f89373becd8c526004cf335e71ddfbbb8d7c08469cf9cdb66
Contents?: true
Size: 323 Bytes
Versions: 9
Compression:
Stored size: 323 Bytes
Contents
# frozen_string_literal: true class Riddle::Query::Delete def initialize(index, *ids) @index = index @ids = ids.flatten end def to_sql if @ids.length > 1 "DELETE FROM #{@index} WHERE id IN (#{@ids.join(', ')})" else "DELETE FROM #{@index} WHERE id = #{@ids.first}" end end end
Version data entries
9 entries across 9 versions & 1 rubygems