3.2.1 (Latest Release)
- Added close connection function close to close currently open connection
- Fix openTransaction on model not returning ORM Class.
- Sync actions (sync, syncIndex, syncIndexAll) to update and retrieve the updated record on success.
- Added schema configuration to allow opt-in for maintaining synced on date when calling sync actions. Will add/update syncOn attribute
- Added saveIndex to save data on index. It's optimized for single action transaction over update
- Added saveAllIndex to save data on all matching index.
- Connector class and index file refactored to remove reference of window action so that the package can be imported in web workers.
- Refactored model.ts file to multiple files to maintain single file single responsibility principle.
- Fixed find or create actions some times opening in read mode only
- Find or create actions now throw InvalidTransaction error if transaction is not in write mode
- Add firstOrFail, findOrFail, findIndexOrFail actions which will find the value or throw NotFound error
- Add firstOrCreate, findOrCreate, findIndexOrCreate actions which will find the value or create new value return it.
- Add findAllIndex action which will return all values as array for the matching index.
- save now throws NotFound Error over default Error.
- findIndex resets the builder settings before finding on index.
- Readme changes with latest usage of library.
- Fix: Orm Class instance mapping in Schema for typescript causing interface mismatch
- Readme changes
- Added with to add relation handling. Takes in array of relations.
- Added withCustom to add relation of ORM as string values.
- Added delete to replace destroyId.
- Added deleteIndex to delete matching values directly on index.
- Added ORM class instance extending Model class to be used over default Model class
- Added new relation HasManyThroughMultiEntry.
- Providing both es6 module for modular programming and direct script based injection through idb.js
- Deprecated relation function on models to add relation. Use with.
- Deprecated destroyId function mon models. Use delete.
- Worker instance handling
- Deletion of indexes and object stores by providing drop settings is removed. These are now handled automatically by comparing existing database structure with table schemas provided.
- Addition of Multi-Entry relation
- Add documentation of usage of multi-entry relation
2.0.0 Release (Breaking Changes)
- Main code base moved to typescript
- Web Worker handling changed from event driven to MessageChannel
- MessageChannel implementation in future will allow use of SharedArrayBuffer to improve performance
- Settings now takes name over dbName for database name
- Settings now takes version over dbVersion for database version
- New idb instance now takes in settings, useWebworker and pathToWebworker parameters over single config settings
- Primary keyPath of objectstores/tables changed to _id from id
- Dedicated transaction action to both main thread and worker thread
- DB instance gives access to Migration
- DB instance gives access to IDBDatabase
- Models now have openTransaction function to create dedicated transaction
- Model interaction handling to code to be asynchronous
- Nested relation not working with normal transaction
- Removed build folder and replaced with dist folder
- Removed transaction function from the main database DB instance. Instead use model.openTransaction
- Removed get function and replaced with all.
1.0.1 Initial Release
- Add base DB interface
- Add migrations
- Add models content on DB connect
- Base Model interaction
- Web Worker implementation
- Model Relations