Skip to content

Is there any way to filter ungrouped servers with specific properties? #2

Description

@andrewhavens

Looking through the code, I see an example for finding a server that has been added to a specific group:

session.group :db do
  session.use 'dbmain', 'user', :properties => { :primary => true }
end

primary = session.servers_for(:db => { :only => { :primary => true } })

But what if that server was never added to a group? Something like this:

session.use 'server', 'user', :properties => { :something => 'unique' }

server = session.servers_for({ :only => { :something => 'unique' } })

If there is no way to do this, is this a feature that we can add?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions