datastax / astra-db-ts

Typescript client for Astra DB Vector
https://npmjs.com/@datastax/astra-db-ts
Apache License 2.0
13 stars 6 forks source link

rename dropCollection to deleteCollection #21

Closed nicoloboschi closed 6 months ago

toptobes commented 6 months ago

Probably won't do so, so as to align with Mongo's name scheme. I'll leave the issue open for now in case anyone else has something else to say

nicoloboschi commented 6 months ago

@toptobes can you elaborate ? Data API and astrapy uses the verb "delete" and not drop https://github.com/datastax/astrapy/blob/14bf3c82ecae3c5fdb9583dcdac19d35b1b1a7b2/astrapy/db.py#L2328-L2346

toptobes commented 6 months ago

Sure thing. We're aligning ourselves with Mongo's own API to have the most "transferable" CRUD experience possible, since Mongo's API is well established already.

I believe it's actually on the todo-list for astra.py to rename theirs to drop_collection() as well

This is the function in question we're naming our own after https://mongodb.github.io/node-mongodb-native/6.3/classes/Db.html#dropCollection