Skip to content

Nodejs transaction redesign feature branch 4 all call types #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 55 commits into
base: nodejs-transaction-redesign-feature-branch-2-adding-commit
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
5de4545
Add the mutex and transaction state etc.
danieljbruce Nov 2, 2023
1ccacec
Remove no-op, get commit tests working
danieljbruce Nov 3, 2023
37918d7
Add mocks and additional debugging
danieljbruce Nov 3, 2023
a02d293
Add tests for commit
danieljbruce Nov 3, 2023
81f2ec0
reverting changes to add new test on transaction
danieljbruce Nov 3, 2023
a5bafbb
Merge branch 'nodejs-transaction-redesign-feature-branch-1a-add-commi…
danieljbruce Nov 3, 2023
d5f5f4b
Change the promise
danieljbruce Nov 3, 2023
c9e8e95
Move the mutex and the state down to derived class
danieljbruce Nov 6, 2023
071d04b
Add hook to call run before commit
danieljbruce Nov 6, 2023
3ff33cc
Add commitAsync to promisify excludes
danieljbruce Nov 6, 2023
bddc355
remove the console logs
danieljbruce Nov 6, 2023
b33d593
Delete run commit
danieljbruce Nov 6, 2023
b055e3d
Remove the private identifier
danieljbruce Nov 6, 2023
f3c0e1d
Add withBeginTransaction
danieljbruce Nov 6, 2023
cebc155
Add another level of abstraction
danieljbruce Nov 6, 2023
fe78cc6
commit async is not needed anymore
danieljbruce Nov 6, 2023
36360a7
This data structure is not needed anymore
danieljbruce Nov 6, 2023
33e09ac
Replace types associated with run to use generics
danieljbruce Nov 6, 2023
8e8f545
Make response type more specific for parseRunAsync
danieljbruce Nov 6, 2023
d4b40e8
Add implementation for runQuery
danieljbruce Nov 7, 2023
6c7a147
Making fixes for runAggregationQuery
danieljbruce Nov 7, 2023
4c3cb5c
Write tests for runAggregateQuery
danieljbruce Nov 7, 2023
d507229
Get one test case passing for runAggregateQuery
danieljbruce Nov 7, 2023
8afa968
remove console log clutter
danieljbruce Nov 7, 2023
db48cb3
Change tests for runAggregationQuery
danieljbruce Nov 7, 2023
69cd491
Add resolver type
danieljbruce Nov 7, 2023
31a2a47
Merge branch 'nodejs-transaction-redesign-feature-branch-1a-add-commi…
danieljbruce Nov 8, 2023
2391ca8
remove only and console log
danieljbruce Nov 8, 2023
905c7da
Try modifications to runQuery
danieljbruce Nov 8, 2023
d1ae72b
Merge branch 'nodejs-transaction-redesign-feature-branch-1a-add-commi…
danieljbruce Nov 8, 2023
d78210a
Modify commit so it doesn’t run early
danieljbruce Nov 8, 2023
13f9b09
Update get with resolver
danieljbruce Nov 8, 2023
14dc743
remove #beginWithCallback
danieljbruce Nov 8, 2023
898df42
Remove #withBeginTransaction
danieljbruce Nov 8, 2023
c20974e
Rename #someFunction with begin transaction
danieljbruce Nov 8, 2023
ce852d1
Fix promisify. Change to a deepStrictEqual check.
danieljbruce Nov 8, 2023
b0fe8f4
Add setImmediate to the tests
danieljbruce Nov 9, 2023
3c52842
Added some tests for call ordering
danieljbruce Nov 9, 2023
816ab0c
Pack testing tool into an object
danieljbruce Nov 9, 2023
21f3afd
Eliminate console logs, use expected order
danieljbruce Nov 9, 2023
7677400
Add a check for transaction not started yet
danieljbruce Nov 9, 2023
e9bd732
Merge branch 'nodejs-transaction-redesign-feature-branch-2-adding-com…
danieljbruce Nov 9, 2023
34903bd
Remove NOT_TRANSACTION
danieljbruce Nov 10, 2023
390d5ee
Remove only
danieljbruce Nov 10, 2023
c8b5c49
Use an enum instead of static class members
danieljbruce Nov 10, 2023
0bdfa0b
TODOs are done
danieljbruce Nov 10, 2023
623bb76
Move excludes to proper position
danieljbruce Nov 10, 2023
521f11c
Simplify the run function a little bit
danieljbruce Nov 10, 2023
9af9ffd
Merge branch 'nodejs-transaction-redesign-feature-branch-2a-adding-co…
danieljbruce Nov 10, 2023
32d40d2
Add comments to tests
danieljbruce Nov 10, 2023
0449676
Modify tests and fix a bug from the merge
danieljbruce Nov 10, 2023
36189de
Fix error message
danieljbruce Nov 10, 2023
1fb109b
Comments and general cleanup
danieljbruce Nov 10, 2023
f09b6f8
Added comments for functions in transaction.ts
danieljbruce Nov 10, 2023
6b73bbf
Add a comment for aggregate queries
danieljbruce Nov 10, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"dependencies": {
"@google-cloud/promisify": "^4.0.0",
"arrify": "^2.0.1",
"async-mutex": "^0.4.0",
"concat-stream": "^2.0.0",
"extend": "^3.0.2",
"google-gax": "^4.0.5",
Expand Down
12 changes: 12 additions & 0 deletions src/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,18 @@ class DatastoreRequest {
);
}

/**
* Datastore allows you to run aggregate queries by aggregate field.
*
* The query is run, and the results are returned as the second argument to
* your callback.
*
* @param {AggregateQuery} query AggregateQuery object.
* @param {RunQueryOptions} options Optional configuration
* @param {function} [callback] The callback function. If omitted, a promise is
* returned.
*
**/
runAggregationQuery(
query: AggregateQuery,
options?: RunQueryOptions
Expand Down
Loading