Skip to content

Conversation

@bshaffer
Copy link
Contributor

@bshaffer bshaffer commented Jul 18, 2024

You (probably): Why are you doing this?
Me: because samples should be able to be executed on the command line (e.g. php datastore/src/delete.php 'key-id-to-delete')
You: Then why do some of the sample functions still contain objects (e.g. datastore/src/run_query.php)?
Me: Well, I didn't really know how to make those accept scalar arguments, and I didn't think it was THAT important of a rule to follow
You: Why did you change the order of arguments around in some cases?
Me: Well, because I'd like to put the most important arguments first, and the $namespaceId (which we needed to add in order to get rid of passing in the whole DatastoreClient object) is not really that interesting, and basically only used in testing, so I wanted it to be last.
You (hopefully): Hey that makes a lot of sense, great job!
Me: Thanks a lot, you too!

/scene

@bshaffer bshaffer requested review from a team as code owners July 18, 2024 16:53
@snippet-bot
Copy link

snippet-bot bot commented Jul 18, 2024

Here is the summary of changes.

You are about to delete 1 region tag.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

@product-auto-label product-auto-label bot added the samples Issues that are directly related to samples. label Jul 18, 2024
@bshaffer bshaffer merged commit d9fcf08 into main Jul 19, 2024
@bshaffer bshaffer deleted the refactor-datastore-samples branch July 19, 2024 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

samples Issues that are directly related to samples.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants