Quick Start
How Redis Works
Redis is key-value, not relational. It cannot filter data natively like SQL databases.
OmniQL bridges this gap by providing filtering logic that works seamlessly with your queries.
Data Model
OmniQL maps entities to Redis Hash structures:Key Pattern
Query Types
Direct Key Lookup (Fast)
When you query byid, OmniQL translates directly to Redis commands:
Filtered Query (Scan + Filter)
When you query by other fields, OmniQL scans keys and filters results:CRUD Operations
GET (HGETALL)
By ID (direct lookup):CREATE (HMSET)
UPDATE (HSET)
DELETE (DEL)
BULK INSERT
UPSERT
DROP TABLE
Filtering Support
OmniQL supports all standard operators for Redis filtering:Example with Complex Filter
Aggregations
OmniQL provides aggregation operations:COUNT
SUM
AVG
MIN / MAX
Transactions
Redis supports transactions with MULTI/EXEC:Note:DISCARDcancels the transaction before execution. OnceEXECruns, changes cannot be rolled back.
Permissions (ACL)
Redis uses ACL for user management:CREATE USER
GRANT
REVOKE
DROP USER
Note: Redis has users with permissions, not roles.CREATE ROLE,DROP ROLE,ASSIGN ROLEare not supported.
Type Storage
All Redis values are stored as strings:
OmniQL automatically converts types when filtering.
Supported Operations
Not Supported
Performance Considerations
Best Practices
- Use ID lookups when possible - Direct key access is instant
- Always use LIMIT - Prevents scanning entire keyspace
- Index hot queries in SQL - For complex filtering, consider PostgreSQL
- Use Redis for what it’s good at - Sessions, caching, counters, real-time data
When to Use Redis with OmniQL
Good use cases:- Session storage
- User profiles / settings
- Caching layer
- Real-time counters
- Simple CRUD by ID
- Aggregations on bounded datasets
- Complex queries with multiple filters
- Relational data with joins
- Large datasets requiring full scans
- Data requiring GROUP BY
Next Steps
PostgreSQL
Full-featured SQL database
Operators
All supported operators

