-
Notifications
You must be signed in to change notification settings - Fork 1.9k
sails-disk does not support .transaction() method #7365
Copy link
Copy link
Open
balderdashy/sails-disk
#64Description
Problem
The sails-disk adapter does not support the .transaction() method, which creates issues when developing applications that need transaction support.
Current Behavior
When attempting to use .transaction() with sails-disk:
await sails.getDatastore().transaction(async (db) => {
// Transaction logic here
});This fails because sails-disk lacks the .transaction() method implementation.
Expected Behavior
sails-disk should support the .transaction() method with pseudo transaction behavior, allowing the same transaction API to work consistently across development (sails-disk) and production (sails-postgresql, sails-mysql) environments.
Impact
- Cannot test transaction-dependent code during development with sails-disk
- Forces developers to use production adapters even for local development
- Creates development/production parity issues
Proposed Solution
Implement a pseudo transaction method in sails-disk that:
- Provides the same
.transaction()API interface - Uses in-memory state management for rollback capability
- Maintains transaction isolation within the adapter context
This would enable consistent development workflow while preserving sails-disk's lightweight nature.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels