Comments (4)
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.
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.
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.
this is supported in modern versions
from metacpan-client.
Related Issues (20)
- testsuite fails on alpine linux HOT 9
- fav.pl shipped? HOT 3
- Include the coverage data in the data returned by the recent call HOT 3
- How to fetch the issues of a release/distribution? HOT 5
- How to fetch kwalitee metrics? HOT 12
- tests fail in fetch() HOT 1
- t/api/reverse-dependencies.t started to fail HOT 2
- ->reverse_dependencies returns only 50 results even if there are more HOT 1
- t/ua_trap.t fails (if WWW::Mechanize::Cached is too old?) HOT 6
- Undeclared dependency LWP::Protocol::https HOT 6
- failed to delete scroller at .../MetaCPAN/Client/Scroll.pm line 162. HOT 4
- Handling of HTTP/transport errors
- t/api/author.t fails HOT 1
- specifying fields in requests can break array type checking HOT 1
- `fields` is documented that it will accept a csv string, but fails if it's not an arrayref HOT 1
- "Wrong type of query arguments" after upgrading from v0-era MetaCPAN::Client HOT 5
- reverse_dependencies() points to an invalid URL HOT 2
- Reverse dependencies method misses some modules HOT 1
- reverse_dependencies broken? HOT 3
- Infinite loop while( my $rs = scroller->next ) HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from metacpan-client.