Sha256: f743c188a2483452342cd4e4ff4427452451a6f4d2a9e02c1cfcb96645d025cd
Contents?: true
Size: 504 Bytes
Versions: 9
Compression:
Stored size: 504 Bytes
Contents
WITH RECURSIVE t AS ( SELECT MIN(<%= @column_name %>) AS <%= @column_name %> FROM <%= @table_name %> UNION ALL SELECT ( SELECT MIN(<%= @column_name %>) FROM <%= @table_name %> WHERE <%= @column_name %> > t.<%= @column_name %>) FROM t WHERE t.<%= @column_name %> IS NOT NULL ) SELECT <%= @column_name %> FROM t WHERE <%= @column_name %> IS NOT NULL <% if @with_nulls %> UNION ALL SELECT NULL WHERE EXISTS(SELECT 1 FROM <%= @table_name %> WHERE <%= @column_name %> IS NULL) <% end %>
Version data entries
9 entries across 9 versions & 1 rubygems