- Added a
reload
function, which loads all data from storage and update the cachedDocs.
- Updated
ls-channel
version to 2.0.3
- Fixed a bug with reading data before documents are cached.
- Fixed a bug with dependencies list on package.json
- Remove rxjs-compat dependency
- Add 'close' method on database and collection
- Use localforage-setitems to improve batch insert speed
- Use an in-memory document cache to improve update speed
- Update RxJS to v6 ( uses rxjs-compat module ).
- Allow the use of filters for fields named 'id'.
- Emit the modifier with update document changes.
- Support updating nested document fields.
- Remove debounce-decorator module.
- Add mock classes for Database and Collection
- Exclude test files from transpiled output
- Add static
Database.create
method to create db with default settings.
- Optimize loading documents from storage when the id is given.
- Fix find/findOne to load data from storage when it gets subscribed.
- Add missing
findOne
method on collection
- Add missing exports on index.ts file
- Fix watch method result to only include matched documents
- Debounce refresh method calls to reduce data loads from IndexedDB
- Change package name to
@creately/rxdata
.
- Add support for multiple tabs/windows using
@creately/lschannel
module.
- Add a
watch
method on collection to subscribe to document changes.
- Combine DatabasePersistor class and Database class.
- Combine CollectionPersistor class and Collection class.
- Reduce memory usage by removing in-memory cache of collection data.
- Reduce memory usage by using
lodash.isequal
with distinctUntilChanged.
- Run unit tests with Karma on ChromeHeadless browser
- Fix metadata collection in memory cache not getting cleared #30
- Add bulk document insert support #29
- Fix issue where document update not being detected by making updates immutable #29
collection.insert([
{ id: 'i1', name: 'n1' },
{ id: 'i2', name: 'n2' },
{ id: 'i3', name: 'n3' },
])
- Add
unsub
method to close all subscriptions in a collection #28
- Edit database
drop
method to close all subscriptions in all collection #28
collection.unsub().subscribe({
complete: () => console.log('closed all query subscriptions'),
})
- Add a static
create
method on Database class #26
Database.configure( options )
const db = Database.create()
- Fix compare function used with
distinctUntilChanged
operator #24
- Remove
IPersistorFactory
public interface #21
- Remove
IPersistor
public interface #21
- Add
ICollectionPersistor
public interface #21
- Add
IDatabasePersistor
public interface #21
- Fix
drop
method to remove all collections #21
- Fix query emits to avoid duplicates #21
- Fix find method on ExtendedQuery #20
- Fix $push operation to return new array #22
- Add drop method to database #18
- Add findOne method to the collection #15
- Add ExtendedCollection and ExtendedQuery classes #16
- Fix typescript mapping for code coverage with ts-jest and the --no-cache flag
- Fix ICollection find method optional options parameter
- Add $pull update operator for collections #13
// before: { id: 'i1', arr: [10, 20, 30] }
// after: { id: 'i1', arr: [10, 30] }
collection.update(
{ id: 'i1' },
{ $pull: { arr: 20 } },
)
- Add $push update operator for collections #10
// before: { id: 'i1', arr: [10] }
// after: { id: 'i1', arr: [10, 20] }
collection.update(
{ id: 'i1' },
{ $push: { arr: 10 } },
)
- Fix unexpected class information issue #8
- Add sort/limit/skip options when querying data #4
collection.find({}, {
sort: { created: -1 },
limit: 10,
skip: 10,
})
- Change TypeScript build target to ES5
- Change RxJS to a peerDependency to avoid duplicates
- Add support for RxJS v5.0.0-beta.0 and above
- API change collection.update to use $set field
-collection.update({ type: 'a' }, { foo: 'bar' })
+collection.update({ type: 'a' }, { $set: { foo: 'bar' }})
- Fix unnecessary collection init calls
- Fix import statements (use 'import * as')
- Add support for RxJS v5.0.0 and above
- Fix missing update call for active queries on data change
- Add missing "main" and "typings" fields to package.json.
- Add exports for IPersistor and IPersistorFactory interfaces.
- Refactor core classes so it'll be easier to test.