This package is currently in a Proof of Concept stage.
This package provides a set of Redis collections that integrate seamlessly with the SoapJS framework, enabling efficient and structured data handling in Redis databases. It includes implementations for common Redis data structures like hashes, lists, sets, and sorted sets.
- Easy-to-use Redis collections and query factories (RedisSearch).
- Integration with the SoapJS framework for structured, clean architecture.
- Support for Redis operations such as find, insert, update, and delete.
- RedisHashCollection: hashes, allowing storage and retrieval of data associated with a key.
- RedisListCollection: Redis lists, supporting pushing, popping, and range queries.
- RedisSetCollection: Redis sets, including adding, removing, and querying members.
- RedisSortedSetCollection: Redis sorted sets, enabling sorted data management and range-based queries.
To install the package, run the following command in your project directory:
npm install @soapjs/soap-node-redis
Ensure that you have the core @soapjs/soap
and redis
packages installed, as these collections depend on it.
Please note that this package is currently in a Proof of Concept stage. This means that while it demonstrates potential applications and functionalities, it may not be suitable for production use. The implementation is intended to explore ideas and should be used as a reference or a starting point for further development rather than a complete solution.
- The package is not fully tested across all possible use cases and scenarios.
- Performance and security aspects have not been fully optimized.
- API and functionalities may change as the project evolves.
-
Import the necessary components from the package:
import { RedisListCollection, RedisConfig, RedisQueryFactory, RedisSource, RedisUtils } from '@soapjs/soap-node-redis';
-
Set up your Redis configuration:
const config = new RedisConfig({ hosts: ['localhost'], ports: ['27017'], iana: false, user: 'admin', password: 'admin', database: 'my_redis_db' });
-
Create a new
RedisSource
instance:const redisSource = await RedisSource.create(config);
-
Use collection to perform database operations:
const collection = new RedisListCollection<MyDocumentType>(redisSource, 'users'); const documents = await collection.list();
The current implementation covers basic functionalities of Redis collections. It is an ongoing project, and contributions are welcome to extend the capabilities and add new features.
For detailed documentation and additional usage examples, visit SoapJS documentation.
If you encounter any issues, please feel free to report them here.
For any questions, collaboration interests, or support needs, you can contact us through the following:
- Official:
- Email: contact@soapjs.com
- Website: https://soapjs.com
- Radoslaw Kamysz:
- Email: radoslaw.kamysz@gmail.com
- Warpcast: @k4mr4ad
- Twitter: @radoslawkamysz
@soapjs/soap-node-redis is MIT licensed.