모듈: Mongoid::Clients::Options::ClassMethods
- 다음에 정의됨:
- lib/mongoid/clients/options.rb
인스턴스 메서드 요약 접기
-
#client_name ⇒ string
문서 클래스의 현재 지속성 컨텍스트에 대한 데이터베이스 클라이언트 이름을 가져옵니다.
-
#컬렉션 ⇒ Mongo::Collection
문서 클래스의 현재 지속성 컨텍스트에 대한 컬렉션 을 가져옵니다.
-
#collection_name ⇒ string
문서 클래스의 현재 지속성 컨텍스트에 대한 컬렉션 이름을 가져옵니다.
-
#database_name ⇒ string
문서 클래스의 현재 지속성 컨텍스트에 대한 데이터베이스 이름을 가져옵니다.
-
#mongo_client ⇒ Mongo::Client
문서 클래스의 현재 지속성 컨텍스트에 대한 클라이언트 를 가져옵니다.
-
#persistence_context ⇒ Mongoid::PersistenceContent
문서 클래스의 현재 지속성 컨텍스트를 가져옵니다.
-
#with(options, &block) ⇒ 객체
차단하는 동안 이 클래스의 지속성 컨텍스트를 변경합니다.
인스턴스 메서드 세부 정보
#client_name ⇒ string
문서 클래스의 현재 지속성 컨텍스트에 대한 데이터베이스 클라이언트 이름을 가져옵니다.
146 147 148 |
# 파일 'lib/mongoid/clients/options.rb', 줄 146 def client_name persistence_context.client_name end |
#컬렉션 ⇒ Mongo::Collection
문서 클래스의 현재 지속성 컨텍스트에 대한 컬렉션 을 가져옵니다.
182 183 184 |
# 파일 'lib/mongoid/clients/options.rb', 줄 182 def 컬렉션 persistence_context.컬렉션 end |
#collection_name ⇒ string
문서 클래스의 현재 지속성 컨텍스트에 대한 컬렉션 이름을 가져옵니다.
158 159 160 |
# 파일 'lib/mongoid/clients/options.rb', 줄 158 def collection_name persistence_context.collection_name end |
#database_name ⇒ string
문서 클래스의 현재 지속성 컨텍스트에 대한 데이터베이스 이름을 가져옵니다.
170 171 172 |
# 파일 'lib/mongoid/clients/options.rb', 줄 170 def database_name persistence_context.database_name end |
#mongo_client ⇒ Mongo::Client
문서 클래스의 현재 지속성 컨텍스트에 대한 클라이언트 를 가져옵니다.
194 195 196 |
# 파일 'lib/mongoid/clients/options.rb', 줄 194 def mongo_client persistence_context.고객 end |
#persistence_context ⇒ Mongoid::PersistenceContent
문서 클래스의 현재 지속성 컨텍스트를 가져옵니다. 지속성 컨텍스트가 설정하다 되지 않은 경우 새 컨텍스트가 초기화되고 반환됩니다.
228 229 230 |
# 파일 'lib/mongoid/clients/options.rb', 줄 228 def persistence_context PersistenceContext.get(self) || PersistenceContext.신규(self) end |
#with(options, &block) ⇒ 객체
차단하는 동안 이 클래스의 지속성 컨텍스트를 변경합니다.
210 211 212 213 214 215 216 217 |
# 파일 'lib/mongoid/clients/options.rb', 줄 210 def 와(, &차단) original_context = PersistenceContext.get(self) original_cluster = persistence_context.cluster PersistenceContext.세트(self, ) yield self 보장 PersistenceContext.지우기(self, original_cluster, original_context) end |