Open catalunha opened 1 year ago
I found this on the other SDKs JS
/**
* Adds a constraint that requires that a key's value matches a value in
* an object returned by a different Parse.Query.
*
* @param {string} key The key that contains the value that is being
* matched.
* @param {string} queryKey The key in the objects returned by the query to
* match against.
* @param {Parse.Query} query The query to run.
* @returns {Parse.Query} Returns the query, so you can chain this call.
*/
matchesKeyInQuery(key: string, queryKey: string, query: ParseQuery): ParseQuery {
const queryJSON = query.toJSON();
queryJSON.className = query.className;
return this._addCondition(key, '$select', {
key: queryKey,
query: queryJSON,
});
}
Android
// TODO(grantland): Convert mutable parameter to immutable t6941155
public Builder<T> whereMatchesKeyInQuery(
String key, String keyInQuery, Builder<?> builder) {
Map<String, Object> condition = new HashMap<>();
condition.put("key", keyInQuery);
condition.put("query", builder);
return addConditionInternal(
key, "$select", Collections.unmodifiableMap(new HashMap<>(condition)));
}
But I don't know if the original creator of this SDK (Flutter SDK) intended to include the same functionality as the other SDKs
I found this on the other SDKs JS
/** * Adds a constraint that requires that a key's value matches a value in * an object returned by a different Parse.Query. * * @param {string} key The key that contains the value that is being * matched. * @param {string} queryKey The key in the objects returned by the query to * match against. * @param {Parse.Query} query The query to run. * @returns {Parse.Query} Returns the query, so you can chain this call. */ matchesKeyInQuery(key: string, queryKey: string, query: ParseQuery): ParseQuery { const queryJSON = query.toJSON(); queryJSON.className = query.className; return this._addCondition(key, '$select', { key: queryKey, query: queryJSON, }); }
Android
// TODO(grantland): Convert mutable parameter to immutable t6941155 public Builder<T> whereMatchesKeyInQuery( String key, String keyInQuery, Builder<?> builder) { Map<String, Object> condition = new HashMap<>(); condition.put("key", keyInQuery); condition.put("query", builder); return addConditionInternal( key, "$select", Collections.unmodifiableMap(new HashMap<>(condition))); }
But I don't know if the original creator of this SDK (Flutter SDK) intended to include the same functionality as the other SDKs
There is this function called whereMatchesKeyInQuery
in parse_query
It seems that the selectKeys
and dontSelectKeys
functions have been implemented twice! with the names whereMatchesKeyInQuery
and whereDoesNotMatchKeyInQuery
!
Also, the selectKeys
and dontSelectKeys
functions seem to be not designed correctly!
New Issue Checklist
Issue Description
In the Parse SDK flutter has this 'selectKeys' function which, besides being poorly documented, I believe is in conflict with another one already developed. Some tests I performed did not return any values. It would be possible for you to analyze whether this function is useful in Parse SDK flutter and what would be a more detailed description of its use or a brief example so that I can better understand how to use this function.
Steps to reproduce
Actual Outcome
None
Expected Outcome
Unknown
Environment
parse_server_sdk: ^4.0.2
Parse Flutter SDK
Server
Logs