|
|
|
|
@ -65,6 +65,11 @@ public class BaseCollection<T: Storable>: SomeCollection, CollectionHolder { |
|
|
|
|
/// Sets a max number of items inside the collection |
|
|
|
|
fileprivate(set) var limit: Int? = nil |
|
|
|
|
|
|
|
|
|
init(store: Store) async { |
|
|
|
|
self.store = store |
|
|
|
|
await self.loadFromFile() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
init(store: Store, indexed: Bool = false, inMemory: Bool = false, limit: Int? = nil, synchronousLoading: Bool = false) { |
|
|
|
|
if indexed { |
|
|
|
|
self._indexes = [:] |
|
|
|
|
|