FirestoreGoogleAppsScript
FirestoreGoogleAppsScript copied to clipboard
add batchwrite functionality
Resolves #65 , resolves #54
This allows batchwrites which has a solution for URL limit since the mask is put in the body.
I did forget to remove one line in the package.json
file that changed the repo param and will need to be reverted back before merging.
Checklist for your code
- [x] Have you all the appropriate dependencies (after
git clone
)?- Install all packages from
package.json
with a barenpm install
.
- Install all packages from
- [-] Have you tested the code yourself? (I published it as a library and linked it in my main branch)
- Install clasp
npm install --global @google/clasp
- Log into your Google Account
clasp login
- Create/Clone Apps Script Project to link and set file extension to "ts". Example
.clasp.json
file:{ "scriptId": "1yIYw-your-scriptID-here-las12jsA2sd", "fileExtension": "ts" }
- Add storable credentials to your script to connect to your Firestore database.
- Add test methods to
Tests.ts
file which validates your change. GSUnit Reference (this one is missing) - Debug/Test your code against your database.
- Install clasp
- [x] Have you documented your functions and their parameters and return values with JSDoc? (I documented the function overloading like how it was documented on Google Firebase JS SDK but it seems that it doesn't get reflected when converted to JS, I didn't update the readme file yet)
- [x] Have you modernized the code to run with the new V8 Runtime?
- [x] Have you privatized or encapsulated all intended functions in a class?
- Global functions can be privatized by appending the "
_
" to the function name.
- Global functions can be privatized by appending the "
- [x] Have you ensured all the appropriate Typescript Definitions are available?
- [x] Does your code follow the Prettier Javascript Style?
- Check syntax and style in one go with
npm run lint
. - Autofix most issues with
npm run fix
.
- Check syntax and style in one go with
I need to test these via clasp upload before I can accept. I plan to do this in the coming days.
Any updates?
@LaughDonor Did you get around to testing it? :)
The readme is updated, only writing tests remain.
hey folks, are we planning to promote this to the library soon?
@abkarino @grahamearley Will this be merged at some point?
@abkarino @grahamearley Will this be merged at some point?
I am afraid, it is not really in my hand. At the moment, it only needs the tests to be written and the project maintainers to test it, verify it and merge it. I am already using it in my repo with some work projects.
Hi @LaughDonor, Is this code going to be merged soon?
@abkarino great work, could you request a re-review?
I am really looking forward for this update to be merged - I have hundreds of sheets to import into Firestore, and each sheet is going to take at least 30 minutes or 1 hour to be fully imported. I reckon adding this feature would definitely reduce the time spent running the script.