-
Notifications
You must be signed in to change notification settings - Fork 56
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
feat: Bigtable Authorized Views - Allow checkAndMutate and ReadModifyWriteRow calls on Authorized Views #1464
Open
danieljbruce
wants to merge
43
commits into
bigtable-authorized-views
Choose a base branch
from
bigtable-authorized-views-move-row-methods
base: bigtable-authorized-views
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…github.com/googleapis/nodejs-bigtable into bigtable-authorized-views-initial-refactor
and readWriteModifyRow
…apis/nodejs-bigtable into bigtable-authorized-views-move-row-methods # Conflicts: # src/row.ts # src/table.ts # src/tabular-api-service.ts # src/utils/table.ts # test/table.ts
product-auto-label
bot
added
the
api: bigtable
Issues related to the googleapis/nodejs-bigtable API.
label
Aug 28, 2024
danieljbruce
changed the title
feat: Expose functionality from Row to be available on the TabularApiSurface too
feat: Bigtable Authorized Views - Expose functionality from Row to be available on the TabularApiSurface too
Aug 28, 2024
danieljbruce
changed the title
feat: Bigtable Authorized Views - Expose functionality from Row to be available on the TabularApiSurface too
feat: Bigtable Authorized Views - Expose functionality from Row to be available on AuthorizedViews too
Aug 29, 2024
danieljbruce
changed the title
feat: Bigtable Authorized Views - Expose functionality from Row to be available on AuthorizedViews too
feat: Bigtable Authorized Views - Allow checkAndMutate and ReadModifyWriteRow calls on Authorized Views
Aug 29, 2024
bhshkh
approved these changes
Sep 5, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well organized code. Thanks for adding the detailed description regarding the changes in the PR!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
api: bigtable
Issues related to the googleapis/nodejs-bigtable API.
size: l
Pull request size is large.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary:
This PR introduces the architecture required to service
checkAndMutate
andreadModifyWriteRow
requests for Authorized views.Background:
this other PR has already been merged towards the effort of supporting data API calls for Authorized Views.
This current PR demonstrates the shape of the architecture that is required for Authorized View requests that correspond to the
checkAndMutate
andreadModifyWriteRow
calls currently serviced by calling theRow
class methods. There may be clerical mistakes, but those will be flushed out by writing unit tests and integration tests.Changes:
Row Data Utils:
increment
,filter
andcreateRules
in theRow
class is moved into new methods inrow-data-utils
. To support authorized view calls this has to be done. You see,increment
,filter
andcreateRules
on the Row class make use of a privatedata
property in that Row class. For this reason, to supportincrement
,filter
andcreateRules
for authorized views we cannot simply createincrement
,filter
andcreateRules
methods on theTabularApiSurface
class because thendata
would have to be passed into them and we do not wantdata
to be part of the method signature. Instead, we moveincrement
,filter
andcreateRules
functionality fromRow
to methods in a sharedrow-data-utils
class. These methods in therow-data-utils
class will now make requests for both tables and authorized views.Authorized View:
increment
,filter
andcreateRules
methods are added to the newAuthorizedView
class for makingcheckAndMutate
andreadModifyWriteRow
calls for an authorized view. These methods should not be exposed onTabularApiSurface
because then they will be exposed onTable
, but this functionality is already available for tables on theincrement
,filter
andcreateRules
methods onRow
.createRules
,filter
andincrement
methods on theAuthorizedView
class will have the same signature as the methods with the same name on theRow
class except they must also be provided with a row id that the request will be made for.AuthorizedView
class will store row data for authorized views just like theRow
class has adata
property that stores data for that row. ThisrowData
variable inAuthorizedView
stores data for each row it makes a request on behalf of.Row:
RowDataUtils
and replaced with one line of code that delegates the call.Table:
TabularApiSurface
constructor is protected.TabularApiSurface:
test/Row.ts
Next Steps:
increment
,createRules
andfilter
methods now available onAuthorizedView
. Make sure that these methods pass the proper parameters along and that they target an authorized view.TabularApiSurface
class.