Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Database * getDocument(id) will return null if document is deleted or doesn’t exists. * contains(id) will return false if document is deleted or doesn’t exist * No Predicate Query * No allDocuments() Document * Change edit() to toMutable(). * MutableDocument.toMutable() should also copy the MutableDocument. Dictionary and Array * Add Dictionary.toMutable() and Array.toMutable(). * Rename Dictionary.setObject(key, value) to Dictionary.setValue(key, value) for all platforms. Currently Objective-C has both setObject() and setValue() as we need to review if it’s appropriate to override setValue() as it is a part of KVO. * Rename Array.set/add/insertObject(index) to Array.set/add/insertValue(index) for all platforms. * Dictionary.setValue(key, null) will set null value in all platforms. * Dictionary.getBoolean(key) and Array.getBoolean(index) will have the following behavior for all platform (I understand that LiteCore implements this behavior): if (value == null || value == NSNull) return false else if (value is number) return number != 0 else return true MutableFragment * Add type setters Query * Change run() to execute() * Meta * Removed Expression.meta(). Use Meta.id and Meta.sequence directly to inline with Function. * Removed Expression.notLessThan, notLessThanOrEqualTo, not GreaterThan, notGreaterThanOrEqualTo, notLike, notRegex, notMatch, notBetween, notIn * Make sure to not Remove IS and ISNOT * ArrayExpression * Move Array related expressions (Any, Every, AnyAndEvery) into its own class: ArrayExpression + ArrayExpressionIn + ArrayExpressionSatisfies. * Array Functions * Moved array related functions from Function to ArrayFunction. * See: couchbaselabs/couchbase-lite-api-spec@7e1174a * PropertyExpression * Extract into its own file instead of having it nested in Expression class. * Function * Not extends Expression. Each function method returns Expression. * FullText: * Have FullTextExpression and FullTextFunction. * FullTextExpression has a static index(indexName) method for creating FullTextExpression object with the given index name. * Moved Expression.match(object) to FullTextExpression.match(text). Support only match string now. * Moved Function.rank(object) to FullTextFunction.rank(indexName) * See: couchbaselabs/couchbase-lite-api-spec@7e1174a * SelectResult * Add SelectResult.property(property) * Query now supports add/remove change listener. When a new listener is added, the listener will get first notified with the current query result. * Query.setParameters() and getParameters() now have copy behavior. When setting a new Parameters, if there is a change listener added, re-run the query and notify. * Change Parameters.setObject(name, value) to setValue(name, value). Index * Change Index.ValueIndexOn() and Index.FTSIndexOn() to Index.valueIndex(items) and Index.fullTextIndex(items). * Index.fullTextIndex(items) allows to set multiple items. Rename FTSIndex to FullTextIndex and FTSIndexItem to FullTextIndexItem. * Add FullTextIndexItem.property(name) and remove FullTextIndexItem.expression(). * Add ValueIndexItem.property(name). LiveQuery * No LiveQuery. Query itself can add/remove change listeners. ChangeListener * addChangeListener(listener) returns ListenerToken. ListenerToken is an opaque interface with no methods. * removeChangeListener(token) takes listener token. * Rename Database.addChangeListener(documentID, listener) to Database.addDocumentChangeListener(id, listener). * Add {Database, Query, Replicator}.add{Document}ChangeListener(id}, queue, listener) in all platforms. * Java: Executor * .NET: TaskFactory * iOS: DispatchQueue * DatabaseChange doesn’t have .external property. We could add this later based on demand in 2.x. ReplicatorConfiguration * Flatten Filter * Move Filter.channels and Filter.documentIDs to the top level of ReplicatorConfiguration * couchbaselabs/couchbase-lite-api-spec@6b2795e SessionAuthenticator * Make expires type safe * Have two constructors instead of one, one for expires Date and one for expires string. * couchbaselabs/couchbase-lite-api-spec@f45d318 Default Conflict Resolver Algorithm * Delete always wins. * Longest generation wins or Max RevID wins if the generations are the same. Document Equality (Pending, not included in this commit) * Two documents are equals when they are from the same database, they have the same ID, and they have the same content. #1960
- Loading branch information