GithubHelp home page GithubHelp logo

Support mongodb gridfs about keyv HOT 13 CLOSED

adityapatadia avatar adityapatadia commented on May 24, 2024
Support mongodb gridfs

from keyv.

Comments (13)

lukechilds avatar lukechilds commented on May 24, 2024

Hi, sorry, I'm not too familiar with gridfs and what it is. Is this just an option in the driver?

If so you can do this by passing the option down to the driver through the storage adapter. You can see an example of how this is done with keyv-sqlite. You can see how the table and busyTimeout options are passed through there.

from keyv.

adityapatadia avatar adityapatadia commented on May 24, 2024

It's different class in same driver http://mongodb.github.io/node-mongodb-native/3.1/api/GridFSBucket.html

I will implement it in my fork so you have reference implementation. It's very crucial feature for me so I am not creating PR for now as I need it very fast.

from keyv.

adityapatadia avatar adityapatadia commented on May 24, 2024

I have published new package here: https://www.npmjs.com/package/keyv-mongo-gridfs You can refer to it anytime. Let me know if you need any help.

from keyv.

thgh avatar thgh commented on May 24, 2024

Hi @adityapatadia thanks for your improvements, do you consider making a pull request now?

You can also clarify how to use the adapter in your readme:

// How to use this adapter
import Keyv from 'keyv'
import MongoAdapter from 'keyv-mongo-gridfs'

const store = new MongoAdapter({
  url: process.env.MONGO_CONNECTION_STRING,
  db: 'some-db',
})
const keyv = new Keyv(connectionString, { store })

from keyv.

adityapatadia avatar adityapatadia commented on May 24, 2024

I have stopped development of the same but that module was pretty stable. I am not able to create PR right now. May be after some I will do it.

I have updated the readme.

from keyv.

jaredwray avatar jaredwray commented on May 24, 2024

@adityapatadia - do you have the source code available for this as I was looking to see if we should add this in as a feature?

from keyv.

adityapatadia avatar adityapatadia commented on May 24, 2024

Source code is here: https://github.com/gumlet/keyv-mongo-gridfs

from keyv.

jaredwray avatar jaredwray commented on May 24, 2024

@adityapatadia - I am considering rolling this into the main driver as an option and was wondering if you would be ok with that?

from keyv.

adityapatadia avatar adityapatadia commented on May 24, 2024

from keyv.

jaredwray avatar jaredwray commented on May 24, 2024

I am perfectly fine as long as you acknowledge my contribution. Please feel free to take any code. — Regards, Aditya Patadia

On 21-Oct-2021, at 8:04 PM, Jared Wray @.***> wrote:  @adityapatadia - I am considering rolling this into the main driver as an option and was wondering if you would be ok with that? — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

Will add you in the pull request when we do this! Thanks so much

from keyv.

jaredwray avatar jaredwray commented on May 24, 2024

@adityapatadia and @thgh - this is now part of the core MongoDB and will be fully live on NPM today.

@adityapatadia - Would you like us to just list the idea as a contributor as we ended up not using any of your code but want to recognize your work on this. Just let us know!

from keyv.

adityapatadia avatar adityapatadia commented on May 24, 2024

from keyv.

jaredwray avatar jaredwray commented on May 24, 2024

Will do. Working on adding in contributions as a listing :-)

from keyv.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.