Move TablePosition into schema

This commit is contained in:
Yuriy Dupyn 2024-01-28 18:43:53 +01:00
parent a2180a3e32
commit ec0a4f2510
4 changed files with 5 additions and 6 deletions

View file

@ -1,4 +1,4 @@
use crate::schema::{Column, TableName, TableSchema};
use crate::schema::{Column, TableName, TablePosition, TableSchema};
use crate::internals::table::Table;
use crate::operation::{Operation, Condition};
use crate::result::DbResult;
@ -8,7 +8,6 @@ use crate::restricted_row::RestrictedRow;
// Use `TablePosition` as index
pub type Tables = Vec<Table>;
pub type TablePosition = usize;
// ==============Interpreter================
#[derive(Debug, Serialize, Deserialize)]

View file

@ -1,6 +1,5 @@
use crate::schema::{Column, TableSchema};
use crate::schema::{Column, TablePosition, TableSchema};
use crate::type_system::Value;
use crate::interpreter::TablePosition;
// Validated operation. Constructed by validation crate.
#[derive(Debug, PartialEq)]

View file

@ -16,6 +16,7 @@ pub struct TableSchema {
}
pub type TableName = String;
pub type TablePosition = usize;
pub type ColumnName = String;
pub type Column = usize;