func (s *Session) SetBatch(n int) {
	if n == 1 {
		// Server interprets 1 as -1 and closes the cursor (!?)
		n = 2
	}
	s.m.Lock()
	s.queryConfig.op.limit = int32(n)
	s.m.Unlock()
}
func (s *Session) SetBatch(n int) {
	if n == 1 {
		
		n = 2
	}
	s.m.Lock()
	s.queryConfig.op.limit = int32(n)
	s.m.Unlock()
}
func ( s * Session ) SetBatch ( n int ) { if n == 1 { // Server interprets 1 as -1 and closes the cursor (!?) n = 2 } s . m . Lock ( ) s . queryConfig . op . limit = int32 ( n ) s . m . Unlock ( ) }
// SetBatch sets the default batch size used when fetching documents from the
// database. It's possible to change this setting on a per-query basis as
// well, using the Query.Batch method.
//
// The default batch size is defined by the database itself.  As of this
// writing, MongoDB will use an initial size of min(100 docs, 4MB) on the
// first batch, and 4MB on remaining ones.
SetBatch sets the default batch size used when fetching documents from the database . It s possible to change this setting on a per - query basis as well using the Query . Batch method . The default batch size is defined by the database itself . As of this writing MongoDB will use an initial size of min ( 100 docs 4MB ) on the first batch and 4MB on remaining ones .