identityKeys
Return the identity keys.
queryLogic.identityKeys()
Return the identity keys used to identity instances associated with the query logic:
Deprecated
Using .identityKeys
has been deprecated in favor of canReflect.getSchema().identity
.
import {QueryLogic} from "can";
const queryLogic = new QueryLogic({
identity: ["_id"]
});
console.log( queryLogic.identityKeys() ); //-> ["_id"]
Returns
{Array<String>}
:
An Array of the identity keys.
Alternatives
Using canReflect.getSchema().identity:
import {canReflect, QueryLogic} from "can";
const queryLogic = new QueryLogic({
identity: ["_id"]
});
const identity = canReflect.getSchema(queryLogic).identity;
console.log( queryLogic.getSchema( identity ) ); //-> ["_id"]