Autonomy Software C++ 24.5.1
Welcome to the Autonomy Software repository of the Mars Rover Design Team (MRDT) at Missouri University of Science and Technology (Missouri S&T)! API reference contains the source code and other resources for the development of the autonomy software for our Mars rover. The Autonomy Software project aims to compete in the University Rover Challenge (URC) by demonstrating advanced autonomous capabilities and robust navigation algorithms.
Loading...
Searching...
No Matches
duckdb::SkipResult Class Reference
Inheritance diagram for duckdb::SkipResult:
Collaboration diagram for duckdb::SkipResult:

Public Member Functions

 SkipResult (CSVStates &states, CSVStateMachine &state_machine, idx_t rows_to_skip)
void InternalAddRow ()
 Internal code to add a row.
Public Member Functions inherited from duckdb::ScannerResult
 ScannerResult (CSVStates &states, CSVStateMachine &state_machine, idx_t result_size)
bool IsStateCurrent (CSVState state) const
void Print () const

Static Public Member Functions

static void AddValue (SkipResult &result, const idx_t buffer_pos)
 Adds a Value to the result.
static bool AddRow (SkipResult &result, const idx_t buffer_pos)
 Adds a Row to the result.
static void InvalidState (SkipResult &result)
 Behavior when hitting an invalid state.
static bool EmptyLine (SkipResult &result, const idx_t buffer_pos)
 Handles EmptyLine states.
static void QuotedNewLine (SkipResult &result)
 Handles QuotedNewline State.
static void SetComment (SkipResult &result, idx_t buffer_pos)
 Code to set comment.
static bool UnsetComment (SkipResult &result, idx_t buffer_pos)
 Code to unset comment.
Static Public Member Functions inherited from duckdb::ScannerResult
static void SetQuoted (ScannerResult &result, idx_t quoted_position)
static void SetUnquoted (ScannerResult &result)
static void SetEscaped (ScannerResult &result)
static void SetComment (ScannerResult &result, idx_t buffer_pos)
static bool UnsetComment (ScannerResult &result, idx_t buffer_pos)
static bool IsCommentSet (const ScannerResult &result)

Public Attributes

idx_t row_count = 0
idx_t rows_to_skip
Public Attributes inherited from duckdb::ScannerResult
bool quoted = false
 Variable to keep information regarding quoted and escaped values.
bool unquoted = false
 If the current quoted value is unquoted.
bool escaped = false
 If the current value has been escaped.
bool comment = false
 Variable to keep track if we are in a comment row. Hence, won't add it.
idx_t quoted_position = 0
LinePosition last_position
const idx_t result_size
 Size of the result.
CSVStateMachine & state_machine
bool cur_line_starts_as_comment = false

Additional Inherited Members

Protected Attributes inherited from duckdb::ScannerResult
CSVStates & states

Constructor & Destructor Documentation

◆ SkipResult()

duckdb::SkipResult::SkipResult ( CSVStates & states,
CSVStateMachine & state_machine,
idx_t rows_to_skip )
169038 : ScannerResult(states, state_machine, STANDARD_VECTOR_SIZE), rows_to_skip(rows_to_skip_p) {
169039}

Member Function Documentation

◆ AddValue()

void duckdb::SkipResult::AddValue ( SkipResult & result,
const idx_t buffer_pos )
inlinestatic

Adds a Value to the result.

169041 {
169042 // nop
169043}

◆ AddRow()

bool duckdb::SkipResult::AddRow ( SkipResult & result,
const idx_t buffer_pos )
inlinestatic

Adds a Row to the result.

169071 {
169072 result.InternalAddRow();
169073 if (result.row_count >= result.rows_to_skip) {
169074 // We skipped enough rows
169075 return true;
169076 }
169077 return false;
169078}
Here is the caller graph for this function:

◆ InvalidState()

void duckdb::SkipResult::InvalidState ( SkipResult & result)
inlinestatic

Behavior when hitting an invalid state.

169080 {
169081 // nop
169082}

◆ EmptyLine()

bool duckdb::SkipResult::EmptyLine ( SkipResult & result,
const idx_t buffer_pos )
inlinestatic

Handles EmptyLine states.

169084 {
169085 return AddRow(result, buffer_pos);
169086}
static bool AddRow(SkipResult &result, const idx_t buffer_pos)
Adds a Row to the result.
Definition duckdb.cpp:169071
Here is the call graph for this function:

◆ QuotedNewLine()

void duckdb::SkipResult::QuotedNewLine ( SkipResult & result)
inlinestatic

Handles QuotedNewline State.

169049 {
169050 // nop
169051}

◆ SetComment()

void duckdb::SkipResult::SetComment ( SkipResult & result,
idx_t buffer_pos )
inlinestatic

Code to set comment.

169053 {
169054 if (!result.states.WasStandard()) {
169055 result.cur_line_starts_as_comment = true;
169056 }
169057 result.comment = true;
169058}

◆ UnsetComment()

bool duckdb::SkipResult::UnsetComment ( SkipResult & result,
idx_t buffer_pos )
inlinestatic

Code to unset comment.

169060 {
169061 // If we are unsetting a comment, it means this row started with a comment char.
169062 bool done = false;
169063 if (!result.cur_line_starts_as_comment) {
169064 done = result.AddRow(result, buffer_pos);
169065 }
169066 result.comment = false;
169067 result.cur_line_starts_as_comment = false;
169068 return done;
169069}

◆ InternalAddRow()

void duckdb::SkipResult::InternalAddRow ( )
inline

Internal code to add a row.

169045 {
169046 row_count++;
169047}

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