vkdb
A time series database engine in C++.
Loading...
Searching...
No Matches
vkdb::VQ Class Reference

Standalone vq interpreter. More...

#include <vq.h>

Public Types

using size_type = uint64_t
 

Public Member Functions

 VQ ()=default
 Deleted default constructor.
 
 VQ (VQ &&) noexcept=default
 Move-construct a VQ object.
 
VQoperator= (VQ &&) noexcept=default
 Move-assign a VQ object.
 
 VQ (const VQ &) noexcept=default
 Copy-construct a VQ object.
 
VQoperator= (const VQ &) noexcept=default
 Copy-assign a VQ object.
 
 ~VQ () noexcept=default
 Destroy the VQ object.
 

Static Public Member Functions

static void runFile (const std::filesystem::path path) noexcept
 Run a file.
 
static void runPrompt () noexcept
 Run the prompt.
 
static void run (const std::string &source) noexcept
 Run a source string.
 
static void error (Token token, const std::string &message) noexcept
 Handle an error.
 
static void runtimeError (const RuntimeError &error) noexcept
 Handle a runtime error.
 

Detailed Description

Standalone vq interpreter.

Definition at line 17 of file vq.h.

Member Typedef Documentation

◆ size_type

using vkdb::VQ::size_type = uint64_t

Definition at line 19 of file vq.h.

Member Function Documentation

◆ error()

void vkdb::VQ::error ( Token token,
const std::string & message )
staticnoexcept

Handle an error.

Reports the error and sets the had_error_ flag.

Parameters
tokenToken where the error occurred.
messageError message.

Definition at line 58 of file vq.cpp.

◆ run()

void vkdb::VQ::run ( const std::string & source)
staticnoexcept

Run a source string.

Parameters
sourceSource string.

Definition at line 44 of file vq.cpp.

◆ runFile()

void vkdb::VQ::runFile ( const std::filesystem::path path)
staticnoexcept

Run a file.

Parameters
pathPath to the file.

Definition at line 13 of file vq.cpp.

◆ runPrompt()

void vkdb::VQ::runPrompt ( )
staticnoexcept

Run the prompt.

The user can enter queries and commands interactively.

Definition at line 30 of file vq.cpp.

◆ runtimeError()

void vkdb::VQ::runtimeError ( const RuntimeError & error)
staticnoexcept

Handle a runtime error.

Reports the runtime error and sets the had_runtime_error_ flag.

Parameters
errorRuntime error.

Definition at line 66 of file vq.cpp.


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