Skip to content

[v3] transaction implemented? #78

Open

Description

@tegument

I'm trying to update a post object in Firebase using a transaction, but i'm getting an error that transaction is not defined.

I looked in:

\react-native-firestack\lib\modules\database.js

but do not see any references to transactions, is this implemented?

Example code:

function toggleStar(postRef, uid) { postRef.transaction(function(post) { if (post) { if (post.stars && post.stars[uid]) { post.starCount--; post.stars[uid] = null; } else { post.starCount++; if (!post.stars) { post.stars = {}; } post.stars[uid] = true; } } return post; }); }

Activity

  1. auser commented on Oct 20, 2016

    @auser
    Contributor

    Good catch. We do not yet have transactions implemented.

    Wanna make a PR? I can walk you through how to do it, if so. Otherwise, I'll see if I have time this weekend.

  2. tegument commented on Oct 20, 2016

    @tegument
    Author

    I took a look but I think this is a bit over my head, I'm not much of a java programmer. I definitely appreciate your help.

  3. Ehesp commented on Nov 6, 2016

    @Ehesp
    Contributor

    Also looking for this feature :)

  4. auser commented on Nov 6, 2016

    @auser
    Contributor

    Alright. I'll prioritize this. Shouldn't be too difficult to implement, I don't think.

  5. mark2685 commented on Nov 16, 2016

    @mark2685

    Also looking for this feature. Any update on this?

  6. changed the title [-]transaction implemented?[/-] [+][v3] transaction implemented?[/+] on Nov 23, 2016
  7. added this to the v3 milestone on Nov 23, 2016
  8. jandacreate commented on Dec 30, 2016

    @jandacreate

    Also looking for this feature, fix yet?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions