MySQL 9.1.0
Source Code Documentation
ddl::Gen_sequence Struct Reference

Generate the next document ID using a monotonic sequence. More...

Inheritance diagram for ddl::Gen_sequence:
[legend]

Public Member Functions

 Gen_sequence (doc_id_t current) noexcept
 Constructor. More...
 
 ~Gen_sequence () noexcept override
 Destructor. More...
 
doc_id_t current () noexcept override
 Get the next document ID. More...
 
doc_id_t fetch (const dtuple_t *dtuple=nullptr) noexcept override
 Not supported. More...
 
void increment () noexcept override
 Advance the document ID. More...
 
doc_id_t max_doc_id () const noexcept override
 
bool is_generated () const noexcept override
 
doc_id_t generated_count () const noexcept override
 
- Public Member Functions inherited from ddl::Context::FTS::Sequence
virtual ~Sequence () noexcept
 Destructor. More...
 

Public Attributes

doc_id_t m_n_generated {}
 Number of document IDs generated. More...
 
- Public Attributes inherited from ddl::Context::FTS::Sequence
doc_id_t m_doc_id {}
 Current document ID. More...
 

Detailed Description

Generate the next document ID using a monotonic sequence.

Constructor & Destructor Documentation

◆ Gen_sequence()

ddl::Gen_sequence::Gen_sequence ( doc_id_t  current)
inlineexplicitnoexcept

Constructor.

Parameters
[in]currentCurrent (maximum document ID) (> 0).

◆ ~Gen_sequence()

ddl::Gen_sequence::~Gen_sequence ( )
inlineoverridenoexcept

Destructor.

Member Function Documentation

◆ current()

doc_id_t ddl::Gen_sequence::current ( )
inlineoverridevirtualnoexcept

Get the next document ID.

Returns
the current document ID and advance the sequence.

Implements ddl::Context::FTS::Sequence.

◆ fetch()

doc_id_t ddl::Gen_sequence::fetch ( const dtuple_t dtuple = nullptr)
inlineoverridevirtualnoexcept

Not supported.

Parameters
[in]dtupleRow from which to fetch ID (ignored).
Returns
the current document ID.

Implements ddl::Context::FTS::Sequence.

◆ generated_count()

doc_id_t ddl::Gen_sequence::generated_count ( ) const
inlineoverridevirtualnoexcept
Returns
the number of document IDs generated.

Implements ddl::Context::FTS::Sequence.

◆ increment()

void ddl::Gen_sequence::increment ( )
inlineoverridevirtualnoexcept

Advance the document ID.

Implements ddl::Context::FTS::Sequence.

◆ is_generated()

bool ddl::Gen_sequence::is_generated ( ) const
inlineoverridevirtualnoexcept
Returns
true, because we always generate the document ID.

Implements ddl::Context::FTS::Sequence.

◆ max_doc_id()

doc_id_t ddl::Gen_sequence::max_doc_id ( ) const
inlineoverridevirtualnoexcept
Returns
the maximum document ID seen so far.

Implements ddl::Context::FTS::Sequence.

Member Data Documentation

◆ m_n_generated

doc_id_t ddl::Gen_sequence::m_n_generated {}

Number of document IDs generated.


The documentation for this struct was generated from the following file: