FirestoreGoogleAppsScript icon indicating copy to clipboard operation
FirestoreGoogleAppsScript copied to clipboard

add batchwrite functionality

Open abkarino opened this issue 2 years ago • 9 comments

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 bare npm install.
  • [-] 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.
  • [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.
  • [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.

abkarino avatar Oct 05 '22 20:10 abkarino

I need to test these via clasp upload before I can accept. I plan to do this in the coming days.

LaughDonor avatar Oct 18 '22 00:10 LaughDonor

Any updates?

ciriousjoker avatar Oct 29 '22 09:10 ciriousjoker

@LaughDonor Did you get around to testing it? :)

trettimann avatar Nov 07 '22 10:11 trettimann

The readme is updated, only writing tests remain.

abkarino avatar Nov 08 '22 09:11 abkarino

hey folks, are we planning to promote this to the library soon?

leonardorb avatar Apr 26 '23 12:04 leonardorb

@abkarino @grahamearley Will this be merged at some point?

ciriousjoker avatar Jun 02 '23 13:06 ciriousjoker

@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.

abkarino avatar Jun 03 '23 21:06 abkarino

Hi @LaughDonor, Is this code going to be merged soon?

@abkarino great work, could you request a re-review?

charan-vendra avatar Sep 02 '23 07:09 charan-vendra

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.

MichaelJoo avatar Oct 14 '23 02:10 MichaelJoo