Sha256: 862840b3d5d70d9ada0ebc2491ba8f2c704f042a4bfe51faec76729611fe975c

Contents?: true

Size: 336 Bytes

Versions: 14

Compression:

Stored size: 336 Bytes

Contents

module Queries
  module User
    class FetchInGroupRel < Inquery::Query::Chainable
      relation fields: 1

      def call
        return ::User.where(%(
          id IN (
            SELECT user_id FROM GROUPS_USERS WHERE group_id IN (
              #{relation.to_sql}
            )
          )
        ))
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
inquery-1.0.11 test/queries/user/fetch_in_group_rel.rb
inquery-1.0.10 test/queries/user/fetch_in_group_rel.rb
inquery-1.0.9 test/queries/user/fetch_in_group_rel.rb
inquery-1.0.8 test/queries/user/fetch_in_group_rel.rb
inquery-1.0.7 test/queries/user/fetch_in_group_rel.rb
inquery-1.0.6 test/queries/user/fetch_in_group_rel.rb
inquery-1.0.5 test/queries/user/fetch_in_group_rel.rb
inquery-1.0.4 test/queries/user/fetch_in_group_rel.rb
inquery-1.0.3 test/queries/user/fetch_in_group_rel.rb
inquery-1.0.2 test/queries/user/fetch_in_group_rel.rb
inquery-1.0.1 test/queries/user/fetch_in_group_rel.rb
inquery-1.0.0 test/queries/user/fetch_in_group_rel.rb
inquery-0.1.0 test/queries/user/fetch_in_group_rel.rb
inquery-0.0.1 test/queries/user/fetch_in_group_rel.rb