Skip to content

An advice #13

Description

@qqaimh

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.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions