GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — datastore: Transaction sends non-transactional requests · Issue #204 · googleapis/google-cloud-node

datastore: Transaction sends non-transactional requests #204

New issue
Copy link
New issue
Copy link
Closed
Closed
datastore: Transaction sends non-transactional requests#204
Copy link
Assignees
stephenplusplus
Labels
🚨This issue needs some love.api: datastoreIssues related to the Datastore API.triage meI really want to be triaged.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
Milestone
Datastore Stable

Description

@ryanseys
ryanseys
opened on Sep 12, 2014
Issue body actions

Confusing that a Transaction object can send non-transaction requests. It would be better if this logic was abstracted into something like a "APIRequest" or something.

Instead of instantiating Dataset with a transaction object, it should just be a API request creator object.

Maybe I'm being too picky.

Activity

Next
  1. stephenplusplus commented on Sep 12, 2014

    @stephenplusplus
    stephenplusplus
    on Sep 12, 2014
    Contributor
    More actions

    👍 it is a bit confusing at first. Maybe:

    function ApiRequest() {}
    ApiRequest.prototype.delete
    ApiRequest.prototype.get
    ApiRequest.prototype.mapQuery
    ApiRequest.prototype.makeReq
    ApiRequest.prototype.runQuery
    ApiRequest.prototype.save
    
    function Transaction() {}
    Transaction.prototype.begin
    Transaction.prototype.commit
    Transaction.prototype.finalize
    Transaction.prototype.rollback
    
    function Dataset() {}
    util.extend(Dataset, ApiRequest);

    We would just need to figure out how to get jsdoc to handle this.

  2. ryanseys commented on Sep 12, 2014

    @ryanseys
    ryanseys
    on Sep 12, 2014
    ContributorAuthor
    More actions

    Why not have Dataset just create an ApiRequest object and return that? We can use this to create requests for all the APIs in this library (much like is done in google-api-nodejs-client. Transaction can just be designed to make transactional ApiRequests.

  3. stephenplusplus commented on Sep 12, 2014

    @stephenplusplus
    stephenplusplus
    on Sep 12, 2014
    Contributor
    More actions

    Why not have Dataset just create an ApiRequest object and return that?

    👍 assuming you mean Dataset methods (.get, .whatever) return ApiRequest objects.

    Can you put together some rough code so I can better visualize how dataset/transaction would work with the new ApiRequest?

  4. ryanseys commented on Sep 12, 2014

    @ryanseys
    ryanseys
    on Sep 12, 2014
    ContributorAuthor
    More actions

    assuming you mean Dataset methods (.get, .whatever) return ApiRequest objects.

    Yes.

    Can you put together some rough code

    Yes. I'll try and get a rough implementation out this weekend.

  5. ryanseys commented on Sep 18, 2014

    @ryanseys
    ryanseys
    on Sep 18, 2014
    ContributorAuthor
    More actions

    Are we still doing this? I held back on implementing this because I wasn't sure what others thought. @silvolu @rakyll

  6. rakyll commented on Sep 18, 2014

    @rakyll
    rakyll
    on Sep 18, 2014
    Contributor
    More actions

    I don't like the fact that non-transactional calls are abstracted as method's of a pseudo transaction either. @ryanseys, could you propose an API with ApiRequest objects? I don't fully understand how it will look from the user's perspective.

  7. ryanseys commented on Sep 19, 2014

    @ryanseys
    ryanseys
    on Sep 19, 2014
    ContributorAuthor
    More actions

    Uhh, the API should not change as far as the user is concerned. More just refactoring. Separation of responsibility.

  8. rakyll commented on Sep 19, 2014

    @rakyll
    rakyll
    on Sep 19, 2014
    Contributor
    More actions

    SGTM.

  9. stephenplusplus
    added
    in progress
    on Sep 29, 2014
  10. jgeewax
    changed the title [-]Transaction sends non-transactional requests[/-] [+]datastore: Transaction sends non-transactional requests[/+] on Oct 5, 2014
  11. stephenplusplus
    closed this as completedon Oct 6, 2014
  12. stephenplusplus
    removed
    in progress
    on Oct 6, 2014
  13. jgeewax
    added
    api: datastoreIssues related to the Datastore API.
    type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
    on Feb 2, 2015
  14. jgeewax
    added this to the Datastore Stable milestone on Feb 2, 2015
  15. 52 remaining items

  16. sofisl
    added 2 commits that reference this issue on Feb 24, 2026

    Bumping version to 0.14.1 (#204)

    d67c246

    chore: the ultimate fix for repo-tools EPERM (#204)

    35d1613
  17. GautamSharda
    added 2 commits that reference this issue on Feb 25, 2026

    fix(build): migrate to main branch (#204)

    8f0c998

    Add a synth file and update CI (#204)

    2432fc6
  18. sofisl
    added 2 commits that reference this issue on Mar 5, 2026

    chore: release 1.0.2 (#204)

    e621f60

    build: only check --engine-strict for production deps (#204)

    abb2658
  19. codyoss
    added 2 commits that reference this issue on Mar 9, 2026

    chore: remove duplicate mocha config (#204)

    d1cb7d6

    chore: remove duplicate mocha config (#204)

    7cff6a8
  20. GautamSharda
    added 5 commits that reference this issue on Mar 11, 2026

    chore: use let and const (#204)

    f283177

    fix: update node issue template (#204)

    ec02170

    chore: release 2.0.2 (#205)

    87aee56

    fix: update node issue template (#204)

    0ee466b

    chore: release 2.0.2 (#205)

    c1f3e9d
  21. sofisl
    added a commit that references this issue on Mar 17, 2026

    Revert "feat: allow synthetic default imports when testing typescript…

    87ce15c
  22. thiyaguk09
    added a commit that references this issue on Mar 18, 2026

    chore: the ultimate fix for repo-tools EPERM (googleapis#204)

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

Metadata

Metadata

Assignees

  • @stephenplusplus
    stephenplusplus

Labels

🚨This issue needs some love.api: datastoreIssues related to the Datastore API.triage meI really want to be triaged.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

    Milestone

    • Datastore Stable

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.