Giter Club home page Giter Club logo

Comments (2)

krojew avatar krojew commented on May 26, 2024

You should be able to call next() on ExecPager to get the data. https://github.com/krojew/cdrs-tokio/blob/master/examples/paged_query.rs shows how to use paged queries, although it uses QueryPager with string queries.

from cdrs-tokio.

naamancurtis avatar naamancurtis commented on May 26, 2024

Thanks for the quick response. Yep, that makes sense.

However I was hoping to abstract the query creation logic into a function that I can call that would return an ExecPager. eg:

    async fn create_query<'a, Q: ToString, P: 'a>(
        &self,
        timeout_duration: Duration,
    ) -> ExecPager<'a, Q, P>;

But without ExecPager I'm not able to type the return type of the function? unless there's a trait I can use in it's place?

As an aside (apologies for hijacking the issue) I notice there's no way of providing parameters to a prepared query when using this pagination interface, is there a specific reason for this, or has the feature just not been implemented yet?

from cdrs-tokio.

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.