MySQL 8.3.0
Source Code Documentation
FullTextSearchIterator Class Referencefinal

An iterator that does a search through a full-text index. More...

#include <ref_row_iterators.h>

Inheritance diagram for FullTextSearchIterator:
[legend]

Public Member Functions

 FullTextSearchIterator (THD *thd, TABLE *table, Index_lookup *ref, Item_func_match *ft_func, bool use_order, bool use_limit, ha_rows *examined_rows)
 
 ~FullTextSearchIterator () override
 
bool Init () override
 Initialize or reinitialize the iterator. More...
 
int Read () override
 Read a single row. More...
 
- Public Member Functions inherited from TableRowIterator
 TableRowIterator (THD *thd, TABLE *table)
 
void UnlockRow () override
 The default implementation of unlock-row method of RowIterator, used in all access methods except EQRefIterator. More...
 
void SetNullRowFlag (bool is_null_row) override
 Mark the current row buffer as containing a NULL row or not, so that if you read from it and the flag is true, you'll get only NULLs no matter what is actually in the buffer (typically some old leftover row). More...
 
void StartPSIBatchMode () override
 Start performance schema batch mode, if supported (otherwise ignored). More...
 
void EndPSIBatchModeIfStarted () override
 Ends performance schema batch mode, if started. More...
 
- Public Member Functions inherited from RowIterator
 RowIterator (THD *thd)
 
virtual ~RowIterator ()=default
 
 RowIterator (const RowIterator &)=delete
 
 RowIterator (RowIterator &&)=default
 
virtual const IteratorProfilerGetProfiler () const
 Get profiling data for this iterator (for 'EXPLAIN ANALYZE'). More...
 
virtual void SetOverrideProfiler ([[maybe_unused]] const IteratorProfiler *profiler)
 
virtual RowIteratorreal_iterator ()
 If this iterator is wrapping a different iterator (e.g. More...
 
virtual const RowIteratorreal_iterator () const
 

Private Attributes

Index_lookup *const m_ref
 
Item_func_match *const m_ft_func
 
const bool m_use_order
 
const bool m_use_limit
 
ha_rows *const m_examined_rows
 

Additional Inherited Members

- Protected Member Functions inherited from TableRowIterator
int HandleError (int error)
 
void PrintError (int error)
 
TABLEtable () const
 
- Protected Member Functions inherited from RowIterator
THDthd () const
 

Detailed Description

An iterator that does a search through a full-text index.

Constructor & Destructor Documentation

◆ FullTextSearchIterator()

FullTextSearchIterator::FullTextSearchIterator ( THD thd,
TABLE table,
Index_lookup ref,
Item_func_match ft_func,
bool  use_order,
bool  use_limit,
ha_rows examined_rows 
)

◆ ~FullTextSearchIterator()

FullTextSearchIterator::~FullTextSearchIterator ( )
override

Member Function Documentation

◆ Init()

bool FullTextSearchIterator::Init ( )
overridevirtual

Initialize or reinitialize the iterator.

You must always call Init() before trying a Read() (but Init() does not imply Read()).

You can call Init() multiple times; subsequent calls will rewind the iterator (or reposition it, depending on whether the iterator takes in e.g. a Index_lookup) and allow you to read the records anew.

Implements RowIterator.

◆ Read()

int FullTextSearchIterator::Read ( )
overridevirtual

Read a single row.

The row data is not actually returned from the function; it is put in the table's (or tables', in case of a join) record buffer, ie., table->records[0].

Return values
0OK
-1End of records
1Error

Implements RowIterator.

Member Data Documentation

◆ m_examined_rows

ha_rows* const FullTextSearchIterator::m_examined_rows
private

◆ m_ft_func

Item_func_match* const FullTextSearchIterator::m_ft_func
private

◆ m_ref

Index_lookup* const FullTextSearchIterator::m_ref
private

◆ m_use_limit

const bool FullTextSearchIterator::m_use_limit
private

◆ m_use_order

const bool FullTextSearchIterator::m_use_order
private

The documentation for this class was generated from the following files: