Skip to content
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

refactor: remove resolvers, remove promise in withBeginTransaction, simplify code calling withBeginTransaction #1212

Merged
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
941810e
Change resolvers
danieljbruce Nov 29, 2023
4c8a4c5
Add a wrapWithBeginTransaction function for get
danieljbruce Nov 29, 2023
1f533d4
Use wrapWithBeginTransaction in more places
danieljbruce Nov 29, 2023
9ff6166
Add callbackWithError function
danieljbruce Nov 29, 2023
7f9147f
Add return type to callbackWithError
danieljbruce Nov 29, 2023
423b530
Delete code that is not used
danieljbruce Nov 29, 2023
dfc5998
There is no need to define a separate type
danieljbruce Nov 29, 2023
267205c
TODO no longer applies
danieljbruce Nov 29, 2023
ddbd200
Remove TODO
danieljbruce Nov 29, 2023
712d3e8
Inline the error type
danieljbruce Nov 30, 2023
015c3d4
Add a comment for callbackWithError
danieljbruce Nov 30, 2023
d598ec6
Added comments to document sendUserCallbackData
danieljbruce Nov 30, 2023
8312310
Move function
danieljbruce Nov 30, 2023
665192e
Do not define a commit type only used once
danieljbruce Nov 30, 2023
19b7d5e
Replace the type in the comment with Function
danieljbruce Nov 30, 2023
3c69ffa
Just use function type for the callback
danieljbruce Nov 30, 2023
08bf1f3
Remove withBeginTransaction
danieljbruce Dec 7, 2023
2714f7c
Simplify code usage of withBeginTransaction
danieljbruce Dec 7, 2023
908995b
function should not have any arguments
danieljbruce Dec 7, 2023
039394e
Remove generic Args parameter
danieljbruce Dec 7, 2023
34c92b9
Remove TODOs that are not relevant anymore.
danieljbruce Dec 7, 2023
fde0db4
Rename to withBeginTransaction
danieljbruce Dec 11, 2023
7047a32
Update comments for withBeginTransaction
danieljbruce Dec 11, 2023
d48633c
Simplify diff
danieljbruce Dec 11, 2023
b32ec8d
Remove error as null
danieljbruce Dec 11, 2023
edc9df2
withBeginTransaction
danieljbruce Dec 11, 2023
d45838e
Add a comment to indicate error
danieljbruce Jan 2, 2024
111a236
Rename method to beginTxAsync
danieljbruce Jan 2, 2024
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
Prev Previous commit
Next Next commit
Replace the type in the comment with Function
Replace with Function to eliminate references to the generic parameter which make CI tests fail.
  • Loading branch information
danieljbruce committed Nov 30, 2023
commit 19b7d5e5c1b057b14def30e9c8f13e3e7ea9110f
2 changes: 1 addition & 1 deletion src/transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1040,7 +1040,7 @@ class Transaction extends DatastoreRequest {
* user that are used for the beginTransaction grpc call.
* @param {Resolver<T>} [resolver] A resolver object used to construct a
* custom promise which is run after ensuring a beginTransaction call is made.
* @param {(...args: [Error | null, ...T] | [Error | null]) => void} [callback]
* @param {Function} [callback]
* A callback provided by the user that expects an error in the first
* argument and a custom data type for the rest of the arguments
* @private
Expand Down
Loading