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::ScannerResult Class Reference
Inheritance diagram for duckdb::ScannerResult:
Collaboration diagram for duckdb::ScannerResult:

Public Member Functions

 ScannerResult (CSVStates &states, CSVStateMachine &state_machine, idx_t result_size)
bool IsStateCurrent (CSVState state) const
void Print () const

Static Public Member Functions

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

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

Protected Attributes

CSVStates & states

Constructor & Destructor Documentation

◆ ScannerResult()

duckdb::ScannerResult::ScannerResult ( CSVStates & states,
CSVStateMachine & state_machine,
idx_t result_size )
168345 : result_size(result_size_p), state_machine(state_machine_p), states(states_p) {
168346}
const idx_t result_size
Size of the result.
Definition duckdb.cpp:167232

Member Function Documentation

◆ SetQuoted()

void duckdb::ScannerResult::SetQuoted ( ScannerResult & result,
idx_t quoted_position )
inlinestatic
167184 {
167185 if (!result.quoted) {
167186 result.quoted_position = quoted_position;
167187 }
167188 result.quoted = true;
167189 result.unquoted = true;
167190 }

◆ SetUnquoted()

void duckdb::ScannerResult::SetUnquoted ( ScannerResult & result)
inlinestatic
167192 {
167193 if (result.states.states[0] == CSVState::UNQUOTED && result.states.states[1] == CSVState::UNQUOTED &&
167194 result.state_machine.dialect_options.state_machine_options.escape != '\0') {
167195 // This means we touched an unescaped quote, we must go through the remove escape code to remove it.
167196 result.escaped = true;
167197 }
167198 result.quoted = true;
167199 }
@ UNQUOTED
State when inside a quoted field.
Definition duckdb.cpp:59184

◆ SetEscaped()

void duckdb::ScannerResult::SetEscaped ( ScannerResult & result)
inlinestatic
167201 {
167202 result.escaped = true;
167203 }

◆ SetComment()

void duckdb::ScannerResult::SetComment ( ScannerResult & result,
idx_t buffer_pos )
inlinestatic
167204 {
167205 result.comment = true;
167206 }

◆ UnsetComment()

bool duckdb::ScannerResult::UnsetComment ( ScannerResult & result,
idx_t buffer_pos )
inlinestatic
167207 {
167208 result.comment = false;
167209 return false;
167210 }

◆ IsCommentSet()

bool duckdb::ScannerResult::IsCommentSet ( const ScannerResult & result)
inlinestatic
167211 {
167212 return result.comment == true;
167213 }

◆ IsStateCurrent()

bool duckdb::ScannerResult::IsStateCurrent ( CSVState state) const
inline
167215 {
167216 return states.states[1] == state;
167217 }

◆ Print()

void duckdb::ScannerResult::Print ( ) const
inline
167237 {
167238 state_machine.Print();
167239 }

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