Scan for a query.
968701
@Override
  public void scan(InH3Amp in, PathH3Amp path, Object[] values)
  {
    int ch = read();
    
    switch (ch) {
    case 0xd0:
      readDefinition(in);
      scan(in, path, values);
      return;
      
    case 0xd1: case 0xd2: case 0xd3: 
    case 0xd4: case 0xd5: case 0xd6: case 0xd7:
    case 0xd8: case 0xd9: case 0xda: case 0xdb:
    case 0xdc: case 0xdd: case 0xde: case 0xdf:
    {
      int id = ch - 0xd0;

      in.serializer(id).scan(this, path, in, values);
      return;
    }
      
    case 0xe0: case 0xe1: case 0xe2: case 0xe3: 
    case 0xe4: case 0xe5: case 0xe6: case 0xe7:
    case 0xe8: case 0xe9: case 0xea: case 0xeb:
    case 0xec: case 0xed: case 0xee: case 0xef:
    {
      int id = (int) readLong(ch - 0xe0, 4);
      
      in.serializer(id).scan(this, path, in, values);
      return;
    }
      
    default:
      throw error(L.l("Unexpected opcode 0x{0} while scanning for {1}",
                      Integer.toHexString(ch), path));
    }
  }
894595
def query(cls, name=None, offset=None, limit=None, api=None):
        

        api = api or cls._API
        return super(Automation, cls)._query(
            url=cls._URL['query'],
            name=name,
            offset=offset,
            limit=limit,
            api=api,
        )
553581
def query(transport, query):
    """"""
    with CommandLineClient(transport) as client:
        echo_event(client.query(query))
388863
@Override
  void scan(EnvKelp query, Object []values, RowCursor cursor)
  {
    try (InputStream is = cursor.openInputStream(getColumn().index())) {
      if (is == null) {
        return;
      }

      _serializer.query(is, _query, values);
    } catch (IOException e) {
      log.log(Level.FINER, e.toString(), e);
    }
  }
596416
def main(search, query):
    """"""
    url = search.search(query)
    print(url)
    search.open_page(url)
17359
public void search(String query) {
        final Query newQuery = searcher.getQuery().setQuery(query);
        searcher.setQuery(newQuery).search();
    }
563452
def query(name):
    """"""
    collection = Collection.query.filter_by(name=name).one()
    click.echo(collection.dbquery)
883657
def scan(self, match="*", count=1000, cursor=0):
        
        if self.serialized:
            cursor, data = self._client.zscan(
                self.key_prefix, cursor=cursor, match=match, count=count)
            return (cursor, list(map(
                lambda x: (self._loads(x[0]), self.cast(x[1])), data)))
        else:
            cursor, data = self._client.zscan(
                self.key_prefix, cursor=cursor, match=match, count=count)
            return (cursor, list(map(
                lambda x: (self._decode(x[0]), self.cast(x[1])), data)))
499217
def search(self, pattern, count=None):
        
        return self._scan(match=pattern, count=count)
1041833
def search(cls, query, page=1):
        
        path = '/files/search/{query}/page/{page}'.format(query=query, page=page)
        result = cls.client.request(path)
        files = result['files']
        return [cls(f) for f in files]
308825
def _stream_search(self, *args, **kwargs):
        """"""
        for hit in scan(
            self.elastic, query=kwargs.pop("body", None), scroll="10m", **kwargs
        ):
            hit["_source"]["_id"] = hit["_id"]
            yield hit["_source"]
1291068
def query(self):
        """"""
        if self._query is None:
            query_string = self.environ.get('QUERY_STRING')
            self._query = QueryDict([
                (k.decode('utf-8'), v.decode('utf-8'))
                for k, v in urlparse.parse_qsl(
                    query_string, keep_blank_values=True)
            ])
        return self._query
128619
def query_echo(cls, request,
                   foo: (Ptypes.query, String('A query parameter'))) -> [
            (200, 'Ok', String)]:
        ''''''
        log.info('Echoing query param, value is: {}'.format(foo))
        for i in range(randint(0, MAX_LOOP_DURATION)):
            yield
        msg = 'The value sent was: {}'.format(foo)
        Respond(200, msg)
531952
def filter_query(key, expression):
    """"""
    if (isinstance(expression, dict)
            and len(expression) == 1
            and list(expression.keys())[0].startswith('$')):
        compiled_expression = compile_query(expression)
    elif callable(expression):
        def _filter(index, expression=expression):
            result = [store_key
                      for value, store_keys in index.get_index().items()
                      if expression(value)
                      for store_key in store_keys]
            return result
        compiled_expression = _filter
    else:
        compiled_expression = expression

    def _get(query_function, key=key, expression=compiled_expression):
        """Get document key and check against expression."""
        return query_function(key, expression)

    return _get
612871
def query(self, sql: str, args: tuple = None):
        """"""

        with self._cursor() as cursor:
            log.debug('Running SQL: ' + str((sql, args)))
            cursor.execute(sql, args)
            return cursor.fetchall()
617143
def search(self, q, field=None, page=None, per_page=None):
        """"""

        def picker(results):
            if type(results['result']) == list:
                return results['result']
            else:
                return [results['result']]

        return self._get(('search',), picker, q=q, field=field, page=page, per_page=per_page)
592442
def _post_query(self, **query_dict):
        """"""
        param_dict = query_dict.copy()
        return self._send_query(do_post=True, **param_dict)