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::LogStorage Class Referenceabstract
Inheritance diagram for duckdb::LogStorage:

Public Member Functions

virtual const string GetStorageName ()=0
virtual DUCKDB_API void WriteLogEntry (timestamp_t timestamp, LogLevel level, const string &log_type, const string &log_message, const RegisteredLoggingContext &context)=0
 WRITING.
virtual DUCKDB_API void WriteLogEntries (DataChunk &chunk, const RegisteredLoggingContext &context)=0
virtual DUCKDB_API void FlushAll ()=0
virtual DUCKDB_API void Flush (LoggingTargetTable table)=0
virtual DUCKDB_API void Truncate ()
virtual DUCKDB_API bool IsEnabled (LoggingTargetTable table)=0
virtual DUCKDB_API bool CanScan (LoggingTargetTable table)
 READING (OPTIONAL).
virtual DUCKDB_API unique_ptr< LogStorageScanState > CreateScanState (LoggingTargetTable table) const
virtual DUCKDB_API bool Scan (LogStorageScanState &state, DataChunk &result) const
virtual DUCKDB_API void InitializeScan (LogStorageScanState &state) const
virtual DUCKDB_API unique_ptr< TableRef > BindReplace (ClientContext &context, TableFunctionBindInput &input, LoggingTargetTable table)
virtual DUCKDB_API void UpdateConfig (DatabaseInstance &db, case_insensitive_map_t< Value > &config)
 CONFIGURATION.

Static Public Member Functions

static vector< LogicalType > GetSchema (LoggingTargetTable table)
static vector< string > GetColumnNames (LoggingTargetTable table)

Constructor & Destructor Documentation

◆ LogStorage()

DUCKDB_API duckdb::LogStorage::LogStorage ( )
inlineexplicit
39507 {
39508 }

Member Function Documentation

◆ GetSchema()

vector< LogicalType > duckdb::LogStorage::GetSchema ( LoggingTargetTable table)
static
259920 {
259921 switch (table) {
259922 case LoggingTargetTable::ALL_LOGS: {
259923 auto all_logs = GetSchema(LoggingTargetTable::LOG_CONTEXTS);
259924 auto log_entries = GetSchema(LoggingTargetTable::LOG_ENTRIES);
259925 all_logs.insert(all_logs.end(), log_entries.begin() + 1, log_entries.end());
259926 return all_logs;
259927 }
259928 case LoggingTargetTable::LOG_ENTRIES:
259929 return {
259930 LogicalType::UBIGINT, // context_id
259931 LogicalType::TIMESTAMP_TZ, // timestamp
259932 LogicalType::VARCHAR, // log_type
259933 LogicalType::VARCHAR, // level
259934 LogicalType::VARCHAR, // message
259935 };
259936 case LoggingTargetTable::LOG_CONTEXTS:
259937 return {
259938 LogicalType::UBIGINT, // context_id
259939 LogicalType::VARCHAR, // scope
259940 LogicalType::UBIGINT, // connection_id
259941 LogicalType::UBIGINT, // transaction_id
259942 LogicalType::UBIGINT, // query_id
259943 LogicalType::UBIGINT, // thread
259944 };
259945 default:
259946 throw NotImplementedException("Unknown logging target table");
259947 }
259948}

◆ GetColumnNames()

vector< string > duckdb::LogStorage::GetColumnNames ( LoggingTargetTable table)
static
259950 {
259951 switch (table) {
259952 case LoggingTargetTable::ALL_LOGS: {
259953 auto all_logs = GetColumnNames(LoggingTargetTable::LOG_CONTEXTS);
259954 auto log_entries = GetColumnNames(LoggingTargetTable::LOG_ENTRIES);
259955 all_logs.insert(all_logs.end(), log_entries.begin() + 1, log_entries.end());
259956 return all_logs;
259957 }
259958 case LoggingTargetTable::LOG_ENTRIES:
259959 return {"context_id", "timestamp", "type", "log_level", "message"};
259960 case LoggingTargetTable::LOG_CONTEXTS:
259961 return {
259962 "context_id", "scope", "connection_id", "transaction_id", "query_id", "thread_id",
259963 };
259964 default:
259965 throw NotImplementedException("Unknown logging target table");
259966 }
259967}

◆ WriteLogEntry()

virtual DUCKDB_API void duckdb::LogStorage::WriteLogEntry ( timestamp_t timestamp,
LogLevel level,
const string & log_type,
const string & log_message,
const RegisteredLoggingContext & context )
pure virtual

◆ WriteLogEntries()

virtual DUCKDB_API void duckdb::LogStorage::WriteLogEntries ( DataChunk & chunk,
const RegisteredLoggingContext & context )
pure virtual

Implemented in duckdb::BufferingLogStorage.

◆ FlushAll()

virtual DUCKDB_API void duckdb::LogStorage::FlushAll ( )
pure virtual

Implemented in duckdb::BufferingLogStorage.

◆ Flush()

virtual DUCKDB_API void duckdb::LogStorage::Flush ( LoggingTargetTable table)
pure virtual

Implemented in duckdb::BufferingLogStorage.

◆ Truncate()

void duckdb::LogStorage::Truncate ( )
virtual

Reimplemented in duckdb::BufferingLogStorage, and duckdb::FileLogStorage.

259978 {
259979 throw NotImplementedException("Not implemented for this LogStorage: TruncateLogStorage");
259980}

◆ IsEnabled()

virtual DUCKDB_API bool duckdb::LogStorage::IsEnabled ( LoggingTargetTable table)
pure virtual

Implemented in duckdb::BufferingLogStorage.

◆ CanScan()

virtual DUCKDB_API bool duckdb::LogStorage::CanScan ( LoggingTargetTable table)
inlinevirtual

READING (OPTIONAL).

Reimplemented in duckdb::InMemoryLogStorage.

39526 {
39527 return false;
39528 }

◆ CreateScanState()

unique_ptr< LogStorageScanState > duckdb::LogStorage::CreateScanState ( LoggingTargetTable table) const
virtual
259969 {
259970 throw NotImplementedException("Not implemented for this LogStorage: CreateScanEntriesState");
259971}

◆ Scan()

bool duckdb::LogStorage::Scan ( LogStorageScanState & state,
DataChunk & result ) const
virtual
259972 {
259973 throw NotImplementedException("Not implemented for this LogStorage: ScanEntries");
259974}

◆ InitializeScan()

void duckdb::LogStorage::InitializeScan ( LogStorageScanState & state) const
virtual
259975 {
259976 throw NotImplementedException("Not implemented for this LogStorage: InitializeScanEntries");
259977}

◆ BindReplace()

unique_ptr< TableRef > duckdb::LogStorage::BindReplace ( ClientContext & context,
TableFunctionBindInput & input,
LoggingTargetTable table )
virtual

Reimplemented in duckdb::FileLogStorage.

259989 {
259990 return nullptr;
259991}

◆ UpdateConfig()

void duckdb::LogStorage::UpdateConfig ( DatabaseInstance & db,
case_insensitive_map_t< Value > & config )
virtual

CONFIGURATION.

Reimplemented in duckdb::BufferingLogStorage.

259982 {
259983 if (config.size() > 1) {
259984 throw InvalidInputException("LogStorage does not support passing configuration");
259985 }
259986}

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