Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

Commit

Permalink
add ColumnData struct (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
SimranMakhija7 authored Mar 14, 2024
1 parent e3ae640 commit 9aaddf0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
11 changes: 11 additions & 0 deletions src/dto/column_data.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
use serde::{Deserialize, Serialize};
use serde_json::Value;

#[derive(Debug, Serialize, Deserialize)]
pub struct ColumnData{
pub aggregates: Value,
pub value_range: (i32, i32),
pub is_strong_key: bool,
pub is_weak_key: bool,
pub primary_key_col_name: String,
}
8 changes: 2 additions & 6 deletions src/dto/table_data.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use serde::{Deserialize, Serialize};
use serde_json::Value;
use ColumnData;

#[derive(Debug, Serialize, Deserialize)]
pub struct TableData {
Expand All @@ -8,10 +9,5 @@ pub struct TableData {
pub read_properties: Value,
pub write_properties: Value,
pub file_urls: Vec<String>,
pub columns: Vec<Vec<String>>,
pub aggregates: Value,
pub value_range: (i32, i32),
pub is_strong_key: bool,
pub is_weak_key: bool,
pub primary_key_col_name: String,
pub columns: Vec<ColumnData>,
}

0 comments on commit 9aaddf0

Please sign in to comment.