masumsoft / express-cassandra

Cassandra ORM/ODM/OGM for NodeJS with support for Apache Cassandra, ScyllaDB, Datastax Enterprise, Elassandra & JanusGraph.
http://express-cassandra.readthedocs.io
GNU Lesser General Public License v3.0
228 stars 67 forks source link

[feature/multiple-keyspace] Multiple keyspace support. #228

Closed slowquery closed 3 years ago

slowquery commented 3 years ago

hello. In my project, I had to support multiple keyspaces. but, still #225 #98 issue is not solving. I solved it with minimal changes.

To use a different keyspace, a new object must be created. At this time we cannot support multiple keyspaces because we are using the same object.

I want my Pull Request to be helpful, and I hope it will be updated.

Changelog

bindAsync function interface

bindAsync(options): Promise<void>;

change new ExpressCassandra object instance return

bindAsync(options): Promise<ExpressCassandra>;

Remark

expressCassandra.js line 125, 126 exists for the test case