# hybridse::vm

## Classes

|        | Name                                                                                                                                                                                                                                                                                                         |
| ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| struct | [**hybridse::vm::AscComparor**](https://tobe.gitbook.io/hybridsql/main-1/hybridse/user-manual/c++-api/classes/structhybridse_1_1vm_1_1_asc_comparor)                                                                                                                                                         |
| struct | [**hybridse::vm::AscKeyComparor**](https://tobe.gitbook.io/hybridsql/main-1/hybridse/user-manual/c++-api/classes/structhybridse_1_1vm_1_1_asc_key_comparor)                                                                                                                                                  |
| class  | <p><a href="../classes/classhybridse_1_1vm_1_1_aysnc_row_handler"><strong>hybridse::vm::AysncRowHandler</strong></a><br>A wrapper of table handler which is used as a asynchronous row handler.</p>                                                                                                          |
| struct | [**hybridse::vm::BatchRequestInfo**](https://tobe.gitbook.io/hybridsql/main-1/hybridse/user-manual/c++-api/classes/structhybridse_1_1vm_1_1_batch_request_info)                                                                                                                                              |
| class  | <p><a href="../classes/classhybridse_1_1vm_1_1_batch_request_run_session"><strong>hybridse::vm::BatchRequestRunSession</strong></a><br><a href="namespacehybridse_1_1vm">BatchRequestRunSession</a> is a kind of <a href="namespacehybridse_1_1vm">RunSession</a> designed for batch request mode query.</p> |
| class  | <p><a href="../classes/classhybridse_1_1vm_1_1_batch_run_session"><strong>hybridse::vm::BatchRunSession</strong></a><br><a href="namespacehybridse_1_1vm">BatchRunSession</a> is a kind of <a href="namespacehybridse_1_1vm">RunSession</a> designed for batch mode query.</p>                               |
| class  | <p><a href="../classes/classhybridse_1_1vm_1_1_catalog"><strong>hybridse::vm::Catalog</strong></a><br>A <a href="namespacehybridse_1_1vm">Catalog</a> handler which defines a set of operation for, e.g, database, table and index management.</p>                                                           |
| class  | [**hybridse::vm::CompileInfo**](https://tobe.gitbook.io/hybridsql/main-1/hybridse/user-manual/c++-api/classes/classhybridse_1_1vm_1_1_compile_info)                                                                                                                                                          |
| class  | [**hybridse::vm::CompileInfoCache**](https://tobe.gitbook.io/hybridsql/main-1/hybridse/user-manual/c++-api/classes/classhybridse_1_1vm_1_1_compile_info_cache)                                                                                                                                               |
| class  | [**hybridse::vm::ConcatTableHandler**](https://tobe.gitbook.io/hybridsql/main-1/hybridse/user-manual/c++-api/classes/classhybridse_1_1vm_1_1_concat_table_handler)                                                                                                                                           |
| class  | [**hybridse::vm::CurrentHistoryWindow**](https://tobe.gitbook.io/hybridsql/main-1/hybridse/user-manual/c++-api/classes/classhybridse_1_1vm_1_1_current_history_window)                                                                                                                                       |
| class  | <p><a href="../classes/classhybridse_1_1vm_1_1_data_handler"><strong>hybridse::vm::DataHandler</strong></a><br>The basic dataset operation abstraction.</p>                                                                                                                                                  |
| class  | <p><a href="../classes/classhybridse_1_1vm_1_1_data_handler_list"><strong>hybridse::vm::DataHandlerList</strong></a><br>A sequence of <a href="../classes/classhybridse_1_1vm_1_1_data_handler">DataHandler</a>.</p>                                                                                         |
| class  | <p><a href="../classes/classhybridse_1_1vm_1_1_data_handler_repeater"><strong>hybridse::vm::DataHandlerRepeater</strong></a><br>A implementation of <a href="../classes/classhybridse_1_1vm_1_1_data_handler_list">DataHandlerList</a>.</p>                                                                  |
| class  | <p><a href="../classes/classhybridse_1_1vm_1_1_data_handler_vector"><strong>hybridse::vm::DataHandlerVector</strong></a><br>A implementation of <a href="../classes/classhybridse_1_1vm_1_1_data_handler_list">DataHandlerList</a>.</p>                                                                      |
| struct | [**hybridse::vm::DescComparor**](https://tobe.gitbook.io/hybridsql/main-1/hybridse/user-manual/c++-api/classes/structhybridse_1_1vm_1_1_desc_comparor)                                                                                                                                                       |
| class  | <p><a href="../classes/classhybridse_1_1vm_1_1_engine"><strong>hybridse::vm::Engine</strong></a><br>An engine is responsible to compile SQL on the specific <a href="../classes/classhybridse_1_1vm_1_1_catalog">Catalog</a>.</p>                                                                            |
| class  | <p><a href="../classes/classhybridse_1_1vm_1_1_engine_options"><strong>hybridse::vm::EngineOptions</strong></a><br>An options class for controlling engine behaviour.</p>                                                                                                                                    |
| class  | <p><a href="../classes/classhybridse_1_1vm_1_1_error_row_handler"><strong>hybridse::vm::ErrorRowHandler</strong></a><br>A row's error handler, representing a error row.</p>                                                                                                                                 |
| class  | <p><a href="../classes/classhybridse_1_1vm_1_1_error_table_handler"><strong>hybridse::vm::ErrorTableHandler</strong></a><br>A table dataset's error handler, representing a error table.</p>                                                                                                                 |
| struct | <p><a href="../classes/structhybridse_1_1vm_1_1_explain_output"><strong>hybridse::vm::ExplainOutput</strong></a><br>An options class for controlling runtime interpreter behavior.</p>                                                                                                                       |
| class  | [**hybridse::vm::HistoryWindow**](https://tobe.gitbook.io/hybridsql/main-1/hybridse/user-manual/c++-api/classes/classhybridse_1_1vm_1_1_history_window)                                                                                                                                                      |
| struct | [**hybridse::vm::IndexSt**](https://tobe.gitbook.io/hybridsql/main-1/hybridse/user-manual/c++-api/classes/structhybridse_1_1vm_1_1_index_st)                                                                                                                                                                 |
| class  | [**hybridse::vm::JitOptions**](https://tobe.gitbook.io/hybridsql/main-1/hybridse/user-manual/c++-api/classes/classhybridse_1_1vm_1_1_jit_options)                                                                                                                                                            |
| class  | <p><a href="../classes/classhybridse_1_1vm_1_1_local_tablet"><strong>hybridse::vm::LocalTablet</strong></a><br>Local tablet is responsible to run a task locally.</p>                                                                                                                                        |
| class  | [**hybridse::vm::MemCatalog**](https://tobe.gitbook.io/hybridsql/main-1/hybridse/user-manual/c++-api/classes/classhybridse_1_1vm_1_1_mem_catalog)                                                                                                                                                            |
| class  | [**hybridse::vm::MemPartitionHandler**](https://tobe.gitbook.io/hybridsql/main-1/hybridse/user-manual/c++-api/classes/classhybridse_1_1vm_1_1_mem_partition_handler)                                                                                                                                         |
| class  | [**hybridse::vm::MemRowHandler**](https://tobe.gitbook.io/hybridsql/main-1/hybridse/user-manual/c++-api/classes/classhybridse_1_1vm_1_1_mem_row_handler)                                                                                                                                                     |
| class  | [**hybridse::vm::MemSegmentHandler**](https://tobe.gitbook.io/hybridsql/main-1/hybridse/user-manual/c++-api/classes/classhybridse_1_1vm_1_1_mem_segment_handler)                                                                                                                                             |
| class  | [**hybridse::vm::MemTableHandler**](https://tobe.gitbook.io/hybridsql/main-1/hybridse/user-manual/c++-api/classes/classhybridse_1_1vm_1_1_mem_table_handler)                                                                                                                                                 |
| class  | [**hybridse::vm::MemTableIterator**](https://tobe.gitbook.io/hybridsql/main-1/hybridse/user-manual/c++-api/classes/classhybridse_1_1vm_1_1_mem_table_iterator)                                                                                                                                               |
| class  | [**hybridse::vm::MemTimeTableHandler**](https://tobe.gitbook.io/hybridsql/main-1/hybridse/user-manual/c++-api/classes/classhybridse_1_1vm_1_1_mem_time_table_handler)                                                                                                                                        |
| class  | [**hybridse::vm::MemTimeTableIterator**](https://tobe.gitbook.io/hybridsql/main-1/hybridse/user-manual/c++-api/classes/classhybridse_1_1vm_1_1_mem_time_table_iterator)                                                                                                                                      |
| class  | [**hybridse::vm::MemWindowIterator**](https://tobe.gitbook.io/hybridsql/main-1/hybridse/user-manual/c++-api/classes/classhybridse_1_1vm_1_1_mem_window_iterator)                                                                                                                                             |
| class  | <p><a href="../classes/classhybridse_1_1vm_1_1_partition_handler"><strong>hybridse::vm::PartitionHandler</strong></a><br>The abstraction of partition dataset operation.</p>                                                                                                                                 |
| class  | <p><a href="../classes/classhybridse_1_1vm_1_1_request_run_session"><strong>hybridse::vm::RequestRunSession</strong></a><br><a href="namespacehybridse_1_1vm">RequestRunSession</a> is a kind of <a href="namespacehybridse_1_1vm">RunSession</a> designed for request mode query.</p>                       |
| class  | [**hybridse::vm::RequestUnionTableHandler**](https://tobe.gitbook.io/hybridsql/main-1/hybridse/user-manual/c++-api/classes/classhybridse_1_1vm_1_1_request_union_table_handler)                                                                                                                              |
| class  | [**hybridse::vm::Router**](https://tobe.gitbook.io/hybridsql/main-1/hybridse/user-manual/c++-api/classes/classhybridse_1_1vm_1_1_router)                                                                                                                                                                     |
| class  | <p><a href="../classes/classhybridse_1_1vm_1_1_row_handler"><strong>hybridse::vm::RowHandler</strong></a><br>A row operation abstraction.</p>                                                                                                                                                                |
| class  | <p><a href="../classes/classhybridse_1_1vm_1_1_run_session"><strong>hybridse::vm::RunSession</strong></a><br>A <a href="namespacehybridse_1_1vm">RunSession</a> maintain SQL running context, including compile information, procedure name.</p>                                                             |
| class  | [**hybridse::vm::SchemasContext**](https://tobe.gitbook.io/hybridsql/main-1/hybridse/user-manual/c++-api/classes/classhybridse_1_1vm_1_1_schemas_context)                                                                                                                                                    |
| class  | [**hybridse::vm::SchemaSource**](https://tobe.gitbook.io/hybridsql/main-1/hybridse/user-manual/c++-api/classes/classhybridse_1_1vm_1_1_schema_source)                                                                                                                                                        |
| class  | <p><a href="../classes/classhybridse_1_1vm_1_1_table_handler"><strong>hybridse::vm::TableHandler</strong></a><br>A table dataset operation abstraction.</p>                                                                                                                                                  |
| class  | <p><a href="../classes/classhybridse_1_1vm_1_1_tablet"><strong>hybridse::vm::Tablet</strong></a><br>A component responsible to Query subtask.</p>                                                                                                                                                            |
| class  | [**hybridse::vm::Window**](https://tobe.gitbook.io/hybridsql/main-1/hybridse/user-manual/c++-api/classes/classhybridse_1_1vm_1_1_window)                                                                                                                                                                     |
| class  | [**hybridse::vm::WindowRange**](https://tobe.gitbook.io/hybridsql/main-1/hybridse/user-manual/c++-api/classes/classhybridse_1_1vm_1_1_window_range)                                                                                                                                                          |

## Types

|                                                                                                                                                                                                                                                                                       | Name                                                                                  |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
| enum                                                                                                                                                                                                                                                                                  | [**HandlerType**](#enum-handlertype) { kRowHandler, kTableHandler, kPartitionHandler} |
| enum                                                                                                                                                                                                                                                                                  | [**OrderType**](#enum-ordertype) { kDescOrder, kAscOrder, kNoneOrder}                 |
| enum                                                                                                                                                                                                                                                                                  | [**EngineMode**](#enum-enginemode) { kBatchMode, kRequestMode, kBatchRequestMode}     |
| enum                                                                                                                                                                                                                                                                                  | [**ComileType**](#enum-comiletype) { kCompileSql}                                     |
| typedef ::google::protobuf::RepeatedPtrField<::hybridse::type::IndexDef >                                                                                                                                                                                                             | [**IndexList**](#typedef-indexlist)                                                   |
| typedef std::map< std::string, [ColInfo](https://tobe.gitbook.io/hybridsql/main-1/hybridse/user-manual/c++-api/classes/structhybridse_1_1codec_1_1_col_info) >                                                                                                                        | [**Types**](#typedef-types)                                                           |
| typedef std::map< std::string, [IndexSt](https://tobe.gitbook.io/hybridsql/main-1/hybridse/user-manual/c++-api/classes/structhybridse_1_1vm_1_1_index_st) >                                                                                                                           | [**IndexHint**](#typedef-indexhint)                                                   |
| typedef std::map< [EngineMode](#enum-enginemode), std::map< std::string, boost::compute::detail::lru\_cache< std::string, std::shared\_ptr< [CompileInfo](https://tobe.gitbook.io/hybridsql/main-1/hybridse/user-manual/c++-api/classes/classhybridse_1_1vm_1_1_compile_info) > > > > | [**EngineLRUCache**](#typedef-enginelrucache)                                         |
| typedef std::deque< std::pair< uint64\_t, [Row](https://tobe.gitbook.io/hybridsql/main-1/hybridse/user-manual/c++-api/classes/classhybridse_1_1codec_1_1_row) > >                                                                                                                     | [**MemTimeTable**](#typedef-memtimetable)                                             |
| typedef std::vector< [Row](https://tobe.gitbook.io/hybridsql/main-1/hybridse/user-manual/c++-api/classes/classhybridse_1_1codec_1_1_row) >                                                                                                                                            | [**MemTable**](#typedef-memtable)                                                     |
| typedef std::map< std::string, [MemTimeTable](#typedef-memtimetable), std::greater< std::string > >                                                                                                                                                                                   | [**MemSegmentMap**](#typedef-memsegmentmap)                                           |
| typedef std::map< std::string, std::map< std::string, std::shared\_ptr< [MemTimeTableHandler](https://tobe.gitbook.io/hybridsql/main-1/hybridse/user-manual/c++-api/classes/classhybridse_1_1vm_1_1_mem_time_table_handler) > > >                                                     | [**MemTables**](#typedef-memtables)                                                   |
| typedef std::map< std::string, std::shared\_ptr< type::Database > >                                                                                                                                                                                                                   | [**Databases**](#typedef-databases)                                                   |

## Functions

| Name                                                                                         | Description |
| -------------------------------------------------------------------------------------------- | ----------- |
| [**EngineModeName**](#function-enginemodename)([EngineMode](#enum-enginemode) mode)          | std::string |
| [**GetRowIter**](#function-getrowiter)(int8\_t \* input, int8\_t \* iter)                    | void        |
| [**RowIterHasNext**](#function-rowiterhasnext)(int8\_t \* iter)                              | bool        |
| [**RowIterNext**](#function-rowiternext)(int8\_t \* iter)                                    | void        |
| [**RowIterGetCurSlice**](#function-rowitergetcurslice)(int8\_t \* iter, size\_t idx)         | int8\_t \*  |
| [**RowIterGetCurSliceSize**](#function-rowitergetcurslicesize)(int8\_t \* iter, size\_t idx) | size\_t     |
| [**RowIterDelete**](#function-rowiterdelete)(int8\_t \* iter)                                | void        |
| [**RowGetSlice**](#function-rowgetslice)(int8\_t \* row\_ptr, size\_t idx)                   | int8\_t \*  |
| [**RowGetSliceSize**](#function-rowgetslicesize)(int8\_t \* row\_ptr, size\_t idx)           | size\_t     |

## Attributes

|                     | Name                                                                                                                                                  |
| ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| constexpr uint32\_t | <p><a href="#variable-invalid_pos"><strong>INVALID\_POS</strong></a><br>Invalid position. A column position is invalid if equals to INVALID\_POS.</p> |

## Types Documentation

### enum HandlerType

| Enumerator        | Value | Description |
| ----------------- | ----- | ----------- |
| kRowHandler       |       |             |
| kTableHandler     |       |             |
| kPartitionHandler |       |             |

**Description**:

### enum OrderType

| Enumerator | Value | Description |
| ---------- | ----- | ----------- |
| kDescOrder |       |             |
| kAscOrder  |       |             |
| kNoneOrder |       |             |

**Description**:

### enum EngineMode

| Enumerator        | Value | Description |
| ----------------- | ----- | ----------- |
| kBatchMode        |       |             |
| kRequestMode      |       |             |
| kBatchRequestMode |       |             |

**Description**:

### enum ComileType

| Enumerator  | Value | Description |
| ----------- | ----- | ----------- |
| kCompileSql |       |             |

**Description**:

### typedef IndexList

```cpp
typedef ::google::protobuf::RepeatedPtrField<::hybridse::type::IndexDef> hybridse::vm::IndexList;
```

**Description**:

### typedef Types

```cpp
typedef std::map<std::string, ColInfo> hybridse::vm::Types;
```

**Description**:

### typedef IndexHint

```cpp
typedef std::map<std::string, IndexSt> hybridse::vm::IndexHint;
```

**Description**:

### typedef EngineLRUCache

```cpp
typedef std::map< EngineMode, std::map<std::string, boost::compute::detail::lru_cache< std::string, std::shared_ptr<CompileInfo> > > > hybridse::vm::EngineLRUCache;
```

**Description**:

### typedef MemTimeTable

```cpp
typedef std::deque<std::pair<uint64_t, Row> > hybridse::vm::MemTimeTable;
```

**Description**:

### typedef MemTable

```cpp
typedef std::vector<Row> hybridse::vm::MemTable;
```

**Description**:

### typedef MemSegmentMap

```cpp
typedef std::map<std::string, MemTimeTable, std::greater<std::string> > hybridse::vm::MemSegmentMap;
```

**Description**:

### typedef MemTables

```cpp
typedef std::map<std::string, std::map<std::string, std::shared_ptr<MemTimeTableHandler> > > hybridse::vm::MemTables;
```

**Description**:

### typedef Databases

```cpp
typedef std::map<std::string, std::shared_ptr<type::Database> > hybridse::vm::Databases;
```

**Description**:

## Functions Documentation

### function EngineModeName

```cpp
std::string EngineModeName(
    EngineMode mode
)
```

**Description**:

### function GetRowIter

```cpp
void GetRowIter(
    int8_t * input,
    int8_t * iter
)
```

**Description**:

### function RowIterHasNext

```cpp
bool RowIterHasNext(
    int8_t * iter
)
```

**Description**:

### function RowIterNext

```cpp
void RowIterNext(
    int8_t * iter
)
```

**Description**:

### function RowIterGetCurSlice

```cpp
int8_t * RowIterGetCurSlice(
    int8_t * iter,
    size_t idx
)
```

**Description**:

### function RowIterGetCurSliceSize

```cpp
size_t RowIterGetCurSliceSize(
    int8_t * iter,
    size_t idx
)
```

**Description**:

### function RowIterDelete

```cpp
void RowIterDelete(
    int8_t * iter
)
```

**Description**:

### function RowGetSlice

```cpp
int8_t * RowGetSlice(
    int8_t * row_ptr,
    size_t idx
)
```

**Description**:

### function RowGetSliceSize

```cpp
size_t RowGetSliceSize(
    int8_t * row_ptr,
    size_t idx
)
```

**Description**:

## Attributes Documentation

### variable INVALID\_POS

```cpp
constexpr uint32_t INVALID_POS =
    UINT32_MAX;
```

**Description**:

Invalid position. A column position is invalid if equals to INVALID\_POS.
