You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Spanner docs still talk about checking out a session and then doing operations on that such as session.snapshot and session.batch.
We changed the API long time back where such operations can be done directly on the database object and that is the API we want to promote. Please audit all the docs to scrub out all the calls directly made on session object and replace those with calls on Database object. This should be doe before Beta since we expect an uptick in usage once we mark the client as Beta and we want to people to use the preferred API.
Also the snapshot doc should talk about nuances of using Snapshots with multi use and single use and the fact that users need to call begin if they need to have multiple pending operations.
I presume we will drop discussion of sessions from the narrative / usage docs, but leave the API docs pages in place (since users might still come across them, e.g. in tracebacks).
Yeah I agree leaving the API docs pages in place is OK. We can probably emphasise on those API docs that most users need not interact with these objects directly.
@vkedia so just to make sure, all these methods currently on the session object should be directly done on the database object? Is the session object still needed then?
Any other methods which should be directly on the database?
Users should never have to use session object for anything. If possible we should make it non public.
Also we removed the read and execute_sql methods from database. So users need to create a snapshot to do that.
Activity
vkedia commentedon Aug 7, 2017
cc @lukesneeringer @bjwatson @danoscarmike
vkedia commentedon Aug 7, 2017
Also the snapshot doc should talk about nuances of using Snapshots with multi use and single use and the fact that users need to call
beginif they need to have multiple pending operations.tseaver commentedon Aug 9, 2017
I presume we will drop discussion of sessions from the narrative / usage docs, but leave the API docs pages in place (since users might still come across them, e.g. in tracebacks).
vkedia commentedon Aug 9, 2017
Yeah I agree leaving the API docs pages in place is OK. We can probably emphasise on those API docs that most users need not interact with these objects directly.
vkedia commentedon Nov 17, 2017
cc @lukesneeringer @danoscarmike
I don;t think this has been completely resolved. For eg the transactions doc still talks about using a session and does not mention
database.run_in_transactionmethod:https://googlecloudplatform.github.io/google-cloud-python/stable/spanner/transaction-usage.html
Ditto for snapshots page:
https://googlecloudplatform.github.io/google-cloud-python/stable/spanner/snapshot-usage.html
Can we please reopen this bug? I would also like this to be fixed before marking the client library as GA.
chemelnucfin commentedon Nov 17, 2017
vkedia commentedon Nov 17, 2017
@chemelnucfin Can you reopen this? I do not have permissions.
chemelnucfin commentedon Dec 1, 2017
@vkedia so just to make sure, all these methods currently on the session object should be directly done on the database object? Is the session object still needed then?
Any other methods which should be directly on the database?
vkedia commentedon Dec 1, 2017
Users should never have to use session object for anything. If possible we should make it non public.
Also we removed the
readandexecute_sqlmethods from database. So users need to create asnapshotto do that.lukesneeringer commentedon Dec 18, 2017
@chemelnucfin Is there a PR corresponding to this issue? (Other than the last couple of tests, I think it is the last GA blocking item.)
chemelnucfin commentedon Dec 20, 2017
Closed via #4610, #4611, #4409, #4630
docs: add samples from bigtable (#38)