Giter Club home page Giter Club logo

Comments (4)

haarg avatar haarg commented on July 21, 2024

If you want a real API for this, can you propose a public API? All your last gist does is move code into a private sub, which doesn't seem reasonable for something you want as a public API.

from metacpan-client.

kentfredric avatar kentfredric commented on July 21, 2024

I think, maybe

   $REQUEST->raw_scroll_search(\%CONFIG)

Where %CONFIG is just content to pass to the ScrollSearch->new() method is the basic utility we're looking for here.

ie: Essentially, all I'm/we're looking for is a way to get an Elasticsearch scrolled query that we can manually bolt on to a ->ResultSet later the same way MetaCPAN::Client does.

The reason I chose a hash reference instead of a list is

  • Lower chance of that useless "unbalanced hash" warning occurring when internally casting as hash. ( Just simpler interface logic for us ).
  • And not entirely sure at this point that the direct hash list will be all we need.

Of course, this feature could possibly be complimented with a similar function at the MetaCPAN::Client level, but I'm not entirely certain that those are "consumer level" interfaces, but might be more "MetaCPAN::Client and freinds implementation level" interfaces.

And in that vein, in conjunction with bug #20, we could later add perhaps:

$mcpanclient->raw_scrolled_search({
       %args
});

Which returns a ResultSet that dispatches instances 'MetaCPAN::Client::' . uc %args{type}

And

$mcpanclient->raw_scrolled_search({
       class => "My::Class::Name"
       %args
});

Which returns a ResultSet that dispatches instances of My::Class::Name

But as I said, I'm aware some of these ideas are inconsistent with each other, and I'm not completely sure of half of my opinions yet.

Just the short of it is:

  • It is presently hard to perform arbitrary low level queries
  • Especially to get them to turn into arbitrary objects ( which may be simple subclasses of existing MetaCPAN::Client classes )
  • And these points limit development of extensions to MetaCPAN::Client

from metacpan-client.

oalders avatar oalders commented on July 21, 2024

Being able to bypass the MetaCPAN::Client DSL would be a handy function to have. I like the DWIM aspect for sure, but if we can make it possible to issue arbitrarily complex queries as well which still return the resultset objects, that would solve a lot of problems, in much the same way that DBIx::Class allows raw SQL in queries. I think a discussion of raw_scrolled_search() would be a good start.

from metacpan-client.

mickeyn avatar mickeyn commented on July 21, 2024

this is supported in modern versions

from metacpan-client.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.