Giter Site home page Giter Site logo

Comments (3)

rajivr avatar rajivr commented on June 17, 2024

I'm trying to read a block of tuples in and group them by a prefix. I need to be able to, for example, drop the first element of the tuple, then pass it on. It looks like you tried to prevent that unlike the other fdb apis? (e.g. java and golang).

Thanks for opening this issue.

If I understand your issue correctly, what you are asking for is to take a tuple value of the form (("name", "john"), ("age", 34),) and drop the first element to create a tuple of the form (("age", 34),).

If that is so, then currently there is no public API that can address it. I think this feature will be useful for layer development and I'll add it in the next release.

I'll outline my initial thoughts on how we could implement this in case you are interested in contributing a PR. :-)

Internally, Tuple elements are stored as a Vec<TupleValue>. If we want to implement this feature, we will need to change this to VecDeque<TupleValue>. With that change, we will get push_{back,front} and pop_{back,front} APIs, which we can use to implement this feature. We will also need to check for versionstamp status when we mutate a tuple.

from fdb.

ggilley avatar ggilley commented on June 17, 2024

from fdb.

rajivr avatar rajivr commented on June 17, 2024

@ggilley I've pushed a new Tuple API modeled after Rust's VecDeque to a temporary repository here. The new API will land in 0.4.x release and should address your issue.

I don't know when I might do the next release as am currently busy with the layer crate. Feel free to use this repository in the meantime. Sorry for the delay!

from fdb.

Related Issues (6)

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.