=> find connections
185369
def connections(parameters)
      allowed_parameters = %w(from to via date time isArrivalTime
                              transportations limit page direct sleeper
                              couchette bike)

      query = create_query(parameters, allowed_parameters)
      locations = perform('connections', query)

      locations['connections']
    end
761009
function selectConnectParams (req, res, next) {
  req.connectParams = req[lookupField[req.method]] || {}
  next()
}
1296797
function (connectionName, collectionName, options, cb) {

      options = options || {};
      var connectionObject = connections[connectionName];
      var collection = connectionObject.collections[collectionName];

      // Find all matching documents
      collection.find(options, function (err, results) {
        if (err) return cb(err);
        cb(null, results);
      });
    }
339706
def map(&block)
      collection = []

      each do |connection|
        collection << block.call(connection) if block
      end

      collection
    end
505144
def __find(self, name):
        
        port = None
        if not len(self.__ports):
            raise Exception('No ports defined: %s' % self.__qn)
        if isinstance(name, int):
            qn = '%s[%d]' % (self.__qn, name)
            try:
                port = self.__ports[name]
            except IndexError:
                raise PortNotFound(qn)
        else:
            qn = '.'.join((self.__qn, name))
            for p in self.__ports:
                if name == p.name:
                    port = p
                    break
        if port is None:
            raise PortNotFound(qn)
        qn = '.'.join((self.__qn, port.name))
        return MethodSelector(self.__client, port.methods, qn)
319059
def get_connections(self):
        
        path = Client.urls['all_connections']
        conns = self._call(path, 'GET')
        return conns
228635
public <T> T find(Connection conn, Collection<String> fields, Entity where, RsHandler<T> rsh) throws SQLException {
		final Query query = new Query(SqlUtil.buildConditions(where), where.getTableName());
		query.setFields(fields);
		return find(conn, query, rsh);
	}
1272143
def list_conns(self, filters=None):
        
        _, connection_list = self.handler.streamed_request("list-conns",
                                                           "list-conn", filters)
        return connection_list
838417
def connections(self):
        """"""
        self._check_session()
        status, data = self._rest.get_request('connections')
        return data
142292
async def get_connections(self, data=True):
        
        return await self.menv.get_connections(data=data, as_coro=True)
864475
def get_connection(self, command_name, *keys, **options):
        """"""
        self._checkpid()
        try:
            connection = self._available_connections[self._pattern_idx].pop()
        except IndexError:
            connection = self.make_connection()
        self._in_use_connections[self._pattern_idx].add(connection)
        self._next_pattern()
        return connection
10405
def find(collection, query=None, user=None, password=None,
         host=None, port=None, database='admin', authdb=None):
    '''
    

    '''
    conn = _connect(user, password, host, port, database, authdb)
    if not conn:
        return 'Failed to connect to mongo database'

    try:
        query = _to_dict(query)
    except Exception as err:
        return err

    try:
        log.info("Searching for %r in %s", query, collection)
        mdb = pymongo.database.Database(conn, database)
        col = getattr(mdb, collection)
        ret = col.find(query)
        return list(ret)
    except pymongo.errors.PyMongoError as err:
        log.error("Searching objects failed with error: %s", err)
        return err
861043
def connected?(klass)
      return false if Process.pid != @process_pid.get
      conn = self.retrieve_connection_pool(klass)
      conn && conn.connected?
    end
82673
private static List<ConnectionNotation> getSelfCycleConnections(String id, List<ConnectionNotation> connections) {
    List<ConnectionNotation> list = new ArrayList<ConnectionNotation>();
    for (ConnectionNotation connection : connections) {
      if (connection.getSourceId().getId().equals(id)) {
        list.add(connection);
      }
    }
    return list;
  }
939220
def check_for_connection(self):
        
        for idx, arg in enumerate(self.args):
            if arg.startswith('@'):
                if arg[1:] not in config.connections:
                    self.parser.error("Undefined connection '{}'!".format(arg[1:]))
                config.scgi_url = config.connections[arg[1:]]
                self.LOG.debug("Switched to connection %s (%s)", arg[1:], config.scgi_url)
                del self.args[idx]
                break
907848
def get_all_connections(self, id, connection_name, **args):
        
        while True:
            page = self.get_connections(id, connection_name, **args)
            for post in page["data"]:
                yield post
            next = page.get("paging", {}).get("next")
            if not next:
                return
            args = parse_qs(urlparse(next).query)
            del args["access_token"]
182788
private void getConnection(State state) {
        state.con = query.context().connectionProvider().get();
        debug("getting connection");
        debug("cp={}", query.context().connectionProvider());
    }