// Creates an iterator from the given table.
512088
func (t *tOps) newIterator(f *tFile, slice *util.Range, ro *opt.ReadOptions) iterator.Iterator {
	ch, err := t.open(f)
	if err != nil {
		return iterator.NewEmptyIterator(err)
	}
	iter := ch.Value().(*table.Reader).NewIterator(slice, ro)
	iter.SetReleaser(ch)
	return iter
}
1363655
func (in DirInput) Iterator(index int) (sophie.IterateCloser, error) {
	infos, err := in.Fs.ReadDir(in.Path)
	if err != nil {
		return nil, err
	}

	return NewReader(sophie.FsPath(in).Join(infos[index].Name()))
}
651447
func (session *Session) Table(tableNameOrBean interface{}) *Session {
	session.statement.Table(tableNameOrBean)
	return session
}
1059149
func (m *Source) Table(table string) (*schema.Table, error) {
	u.Infof("source.Table(%q)", table)
	m.tblmu.Lock()
	t, ok := m.tables[table]
	m.tblmu.Unlock()
	if !ok {
		return nil, schema.ErrNotFound
	}
	return t, nil
}
438923
func (s *OrderedSet) Iter() <-chan string {
	c := make(chan string)
	go func() {
		for _, i := range s.s {
			c <- i
		}
		close(c)
	}()

	return c
}
231489
func (transaction *Transaction) NewIterator(opts *ReadOptions) *Iterator {
	return NewNativeIterator(
		unsafe.Pointer(C.rocksdb_transaction_create_iterator(transaction.c, opts.c)))
}
1049258
func (statement *Statement) Table(tableNameOrBean interface{}) *Statement {
	v := rValue(tableNameOrBean)
	t := v.Type()
	if t.Kind() == reflect.Struct {
		var err error
		statement.RefTable, err = statement.Engine.autoMapType(v)
		if err != nil {
			statement.Engine.logger.Error(err)
			return statement
		}
	}

	statement.AltTableName = statement.Engine.TableName(tableNameOrBean, true)
	return statement
}
931091
func (idx *TruncIndex) Iterate(handler func(id string)) {
	idx.Lock()
	defer idx.Unlock()
	idx.trie.Visit(func(prefix patricia.Prefix, item patricia.Item) error {
		handler(string(prefix))
		return nil
	})
}
997978
func MakeTable(params Params) *Table {
	table := new(Table)
	table.params = params
	for n := 0; n < 256; n++ {
		crc := uint16(n) << 8
		for i := 0; i < 8; i++ {
			bit := (crc & 0x8000) != 0
			crc <<= 1
			if bit {
				crc ^= params.Poly
			}
		}
		table.data[n] = crc
	}
	return table
}
1365544
func NewArrayIterator(array Array) Iterator {
	return &arrayIterator{
		basicArrayIterator: basicArrayIterator{array: array, pos: -1},
		array:              array,
		pos:                -1,
	}
}
62348
func (_m *ReadWriter) Iterator(startType *orderer.SeekPosition) (blockledger.Iterator, uint64) {
	ret := _m.Called(startType)

	var r0 blockledger.Iterator
	if rf, ok := ret.Get(0).(func(*orderer.SeekPosition) blockledger.Iterator); ok {
		r0 = rf(startType)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(blockledger.Iterator)
		}
	}

	var r1 uint64
	if rf, ok := ret.Get(1).(func(*orderer.SeekPosition) uint64); ok {
		r1 = rf(startType)
	} else {
		r1 = ret.Get(1).(uint64)
	}

	return r0, r1
}
447244
func (L *State) CreateTable(narr int, nrec int) {
	C.lua_createtable(L.s, C.int(narr), C.int(nrec))
}
285765
func NewIterator4RowPtr(li *List, ptrs []RowPtr) Iterator {
	return &iterator4RowPtr{li: li, ptrs: ptrs}
}
972783
func (session *Session) Table(tableNameOrBean interface{}) *Session {
	session.Statement.Table(tableNameOrBean)
	return session
}
1006034
func NewIterator(cfg API) *Iterator {
	return &Iterator{
		cfg:    cfg.(*frozenConfig),
		reader: nil,
		buf:    nil,
		head:   0,
		tail:   0,
	}
}
891531
func MakeTable(poly uint32) *Table {
	switch poly {
	case IEEE:
		ieeeOnce.Do(ieeeInit)
		return IEEETable
	case Castagnoli:
		castagnoliOnce.Do(castagnoliInit)
		return castagnoliTable
	}
	return simpleMakeTable(poly)
}
67846
func compactionIterator(tc *tableCache, icmp db.Comparer, c *compaction) (cIter db.Iterator, retErr error) {
	iters := make([]db.Iterator, 0, len(c.inputs[0])+1)
	defer func() {
		if retErr != nil {
			for _, iter := range iters {
				if iter != nil {
					iter.Close()
				}
			}
		}
	}()

	if c.level != 0 {
		iter, err := newConcatenatingIterator(tc, c.inputs[0])
		if err != nil {
			return nil, err
		}
		iters = append(iters, iter)
	} else {
		for _, f := range c.inputs[0] {
			iter, err := tc.find(f.fileNum, nil)
			if err != nil {
				return nil, fmt.Errorf("leveldb: could not open table %d: %v", f.fileNum, err)
			}
			iters = append(iters, iter)
		}
	}

	iter, err := newConcatenatingIterator(tc, c.inputs[1])
	if err != nil {
		return nil, err
	}
	iters = append(iters, iter)
	return db.NewMergingIterator(icmp, iters...), nil
}