1
솔직히요청을 가져 오면 == 대신에 Like를 사용하는 이유는 무엇입니까?
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"%K == %@",
attributeName, attributeValue];
솔직히요청을 가져 오면 == 대신에 Like를 사용하는 이유는 무엇입니까?
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"%K == %@",
attributeName, attributeValue];
, 당신은 단지 제작자가 만든 패턴을 다음과 같은 것하지 왜
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"%K like %@",
attributeName, attributeValue];
처럼. 그들은
==
을 사용하여 구현할 수 있었지만,별로 의미가 없었을 것입니다. 일반적으로
==
은 동일한 참조 인 경우와 정확하게 같습니다. 이것은 패턴 일치이므로 패턴과 "같아도"는 항목이 아닌 "같은 항목"을 찾고 싶습니다.
NSPredicate
's를 ==
연산자를 사용하여 지원하지만,이 like
운영자 다르게 수행을 수행합니다 ==의 차이점은 무엇
NSPredicate *newPredicate = [NSPredicate predicateWithFormat:@"anAttribute == %@", [NSNumber numberWithBool:aBool]];
NSPredicate *testForTrue = [NSPredicate predicateWithFormat:@"anAttribute == YES"];
과 같은 –
내가 그것을 얻을 아, == 참조가 있는지 확인 평등하다, 바보 같다. LIKE가 부정확 한 일치 항목과 일치합니까? –
예를 들어 "Mary"와 같은 "Maria"가 true를 반환합니까? 그것이 나를 혼란스럽게 만든다. –