Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config.js to support other jdb adapters #3

Open
pasindud opened this issue Sep 22, 2013 · 2 comments
Open

config.js to support other jdb adapters #3

pasindud opened this issue Sep 22, 2013 · 2 comments

Comments

@pasindud
Copy link

Hi

I think it would be great if we could have something like this

config.js file - https://github.com/gojarvis/Jane/blob/master/config/config.js

dbtype : 'mysql' || 'couch' || 'redis' || 'mongodb',
database : 'my_testdb',
dbusername : 'username',
dbpassword : 'password'

article.js or other files using db connect

schema = new Schema( config.dbtype , {
url: config.db,   // for mongo and othere db's with url's
    database: config.database ,   // for mysql and other db's with databases
    username:config.username   
}),

I tried in the local 👍

@rschwabco
Copy link
Member

The biggest issue is that currently the adapters each use a different connection configuration object, so I'd have to abstract that away too. But good idea, thanks!

@pasindud
Copy link
Author

yea they have bit differences , I think other than that i am quite sure that the queries are the same all but not 100% ( some have additional features ) , but if we can do it , it would be awesome , this would be database independent 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants