모듈: Mongoid::Validatable::Queryable Private
- 포함 항목:
- UniquenessValidator
- 다음에 정의됨:
- lib/mongoid/validable/queryable.rb
개요
이 모듈은 비공개 API의 일부입니다. 이 모듈은 향후 제거되거나 변경될 수 있으므로 가능하면 사용하지 않는 것이 좋습니다.
TODO:
이를 Mongoid::Validatable::Uniqueness 클래스로 이동합니다.
Mongoid::Validatable::Uniqueness 클래스에 포함된 Mixin 모듈은 고유성 쿼리를 실행할 때 지속성 컨텍스트가 지워지도록 합니다.
인스턴스 메서드 요약 접기
-
#with_query(문서) ⇒ 객체
비공개
Wrap the validation inside the an execution block that alert's the client not to clear its persistence options.
인스턴스 메서드 세부 정보
#with_query(문서) ⇒ 객체
이 메서드는 비공개 API의 일부입니다. 이 방법은 향후 제거되거나 변경될 수 있으므로 가능하면 사용하지 않는 것이 좋습니다.
Wrap the validation inside the an execution block that alert's the client not to clear its persistence options.
24 25 26 27 28 29 30 31 32 |
# 파일 'lib/mongoid/validatable/queryable.rb', 줄 24 def with_query(문서) class = 문서.클래스 시작 스레드.begin_execution("#{klass.name}-validate-with-query") yield 보장 스레드.exit_execution("#{klass.name}-validate-with-query") end end |