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

An advice #13

Open
qqaimh opened this issue May 18, 2019 · 2 comments
Open

An advice #13

qqaimh opened this issue May 18, 2019 · 2 comments

Comments

@qqaimh
Copy link

qqaimh commented May 18, 2019

Just an advice.
The initialization of the rebridge is not safe. Just like below example code :
................................................................................................................................................................................................
const Rebridge = require("rebridge");
const redis = require("redis");

const client = redis.createClient();
const db = new Rebridge(client, {
mode: "deasync"
});

db.users = [ ]; // This is what I want to say
............................................................................................................................................................
If I put "db.users = [ ]" in my codes, I will worry about it may clean up the datas in the db.users.
I think it should change to just like "InsertOrCreate", if the db.users exists, it will insert item into db.users; if the db.users does not exist, it will create the db.users, then insert item into the new db.users.
......................................................
Just an advice, Thank you.

@CapacitorSet
Copy link
Owner

That's a good idea, I might implement it sometime. (If someone else wants to work on it, PRs welcome.)

@qqaimh
Copy link
Author

qqaimh commented May 21, 2019

That's a good idea, I might implement it sometime. (If someone else wants to work on it, PRs welcome.)

I am glad to do something, but I am starting my own busssiness. So I am so busy to write many codes, If I succeeded , I think my company will need the people ,like you have great thoughts.
I have to write codes..........

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

No branches or pull requests

2 participants