lib/pg_trunk/core/dependencies_resolver.rb
# Extract dependencies between given oids from the database
Extract dependencies between given oids from the database
Extract dependencies between given oids from the database
def dependencies
        ActiveRecord::Base
          .connection
          .execute(query)
          .each_with_object({}) do |i, obj|
            child = i["child"].to_i
            parents = i["parents"].scan(/\d+/).map(&:to_i)
            obj[child] = parents.uniq
          end
      end
def dependencies ActiveRecord :: Base . connection . execute ( query ) . each_with_object ( { } ) do | i , obj | child = i [ "child" ] . to_i parents = i [ "parents" ] . scan ( / \d + / ) . map ( & :to_i ) obj [ child ] = parents . uniq end end
Extract dependencies between given oids from the database
Extract dependencies between given oids from the database