feat: add serde support

This commit is contained in:
Jindřich Moravec 2024-01-27 19:02:11 +01:00
parent f398faa6aa
commit 5d925290e3
8 changed files with 46 additions and 34 deletions

View file

@ -6,13 +6,14 @@ use crate::operation::{ColumnSelection, Condition, Operation};
use crate::result::DbResult;
use crate::type_system::{DbType, IndexableValue, Value};
use bimap::BiMap;
use serde::{Deserialize, Serialize};
// Use `TablePosition` as index
pub type Tables = Vec<Table>;
pub type TablePosition = usize;
// ==============Interpreter================
#[derive(Debug)]
#[derive(Debug, Serialize, Deserialize)]
pub struct State {
table_name_position_mapping: BiMap<TableName, TablePosition>,
tables: Tables,