Find a record by name and queue ID.
    Return the rows on success (empty list if not found)
    Raise on error
327494
def queuedb_find(path, queue_id, name, offset=None, limit=None):
    
    return queuedb_findall(path, queue_id, name=name, offset=offset, limit=limit)
650703
def get_row_by_fsid(self, fs_id):
        ''''''
        for row in self.liststore:
            if row[FSID_COL] == fs_id:
                return row
        return None
1224882
function findRecords(store, fieldName, texts) {
      var records = [];
      texts.forEach(function (text) {
        var index = store.find(fieldName, text);
        if (index === -1) {
          throw new Error('Text: ' + text + ' not found for fieldName: ' + fieldName);
        }
        records.push(index);
      });
      return records;
    }
325503
def find_one(self, cls, id):
        """"""
        db_result = None
        for rec in read_rec(cls.get_table_name(), id):
            db_result = rec
            break  # Only read the first returned - which should be all we get
        if not db_result:
            return None

        obj = cls.from_data(db_result['value'])
        return obj
1109325
def _find(self, id_):
        
        cur = self._connection.cursor()
        cur.execute(
            'SELECT fileNumber, offset FROM sequences WHERE id = ?', (id_,))
        row = cur.fetchone()
        if row is None:
            return None
        else:
            return self._getFilename(row[0]), row[1]
996217
def get_records(cls, ids, with_deleted=False):
        
        with db.session.no_autoflush:
            query = RecordMetadata.query.filter(RecordMetadata.id.in_(ids))
            if not with_deleted:
                query = query.filter(RecordMetadata.json != None)  # noqa

            return [cls(obj.json, model=obj) for obj in query.all()]
1216553
def get_queue(cls, name, priority=0, **fields_if_new):
        
        queue_kwargs = {'name': name, 'priority': priority}
        retries = 0
        while retries < 10:
            retries += 1
            try:
                queue, created = cls.get_or_connect(**queue_kwargs)
            except IndexError:
                # Failure during the retrieval https://friendpaste.com/5U63a8aFuV44SEgQckgMP
                # => retry
                continue
            except ValueError:
                # more than one (race condition https://github.com/yohanboniface/redis-limpyd/issues/82 ?)
                try:
                    queue = cls.collection(**queue_kwargs).instances()[0]
                except IndexError:
                    # but no more now ?!
                    # => retry
                    continue
                else:
                    created = False

            # ok we have our queue, stop now
            break

        if created and fields_if_new:
            queue.set_fields(**fields_if_new)

        return queue
591842
def get(self, record_id):
        
        record_url = self.record_url(record_id)
        return self._get(record_url)
90740
def get_records(self, sequence_id, gt=None, gte=None, lt=None, lte=None, limit=None,
                    query_ascending=True, results_ascending=True):
        
962532
def queue_exists(self, name):
        
        try:
            queue = self._manager.head(name)
            return True
        except exc.NotFound:
            return False
1225331
function findVertex(name) {
		var objects = alasql.databases[alasql.useid].objects;
		for (var k in objects) {
			if (objects[k].name === name) {
				return objects[k];
			}
		}
		return undefined;
	}
1313551
def get_row(self, index):
        
        url = self.build_url(self._endpoints.get('get_row').format(id=index))
        response = self.session.get(url)
        if not response:
            return None
        return self.row_constructor(parent=self, **{self._cloud_data_key: response.json()})
1197099
function findRecord(store, fieldName, text) {
      var index = store.find(fieldName, text);
      if (index === -1) {
        throw new Error('Text: ' + text + ' not found for fieldName: ' + fieldName);
      }
      return index;
    }
881897
def get_records(self, name):
        
        if name in self._cache:
            return self._cache[name].values()
        else:
            return []
122807
def item(p_queue, queue_id, host=None):
    if host is not None:
        return os.path.join(_path(host, _c.FSQ_QUEUE, root=hosts(p_queue)),
                            valid_name(queue_id))
    ''''''
    return os.path.join(_path(p_queue, _c.FSQ_QUEUE), valid_name(queue_id))
1222328
def get(self, query, *parameters, **kwargs):
        """"""
        rows = self.query(query, *parameters, **kwargs)
        if not rows:
            return None
        elif len(rows) > 1:
            raise ValueError('Multiple rows returned for get() query')
        else:
            return rows[0]
792327
def find(cls, _id):
        

        if not _id:
            return None
        try:
            return next(cls.where(id=_id))
        except StopIteration:
            raise PanoptesAPIException(
                "Could not find {} with id='{}'".format(cls.__name__, _id)
            )