Skip to content

Commit

Permalink
chore: make struct can debug
Browse files Browse the repository at this point in the history
  • Loading branch information
grieve54706 committed Dec 2, 2024
1 parent c3c3c9c commit 7cc2f01
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions wren-core-py/src/manifest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ pub fn to_manifest(mdl_base64: &str) -> Result<Manifest, CoreError> {
}

#[pyclass(name = "Manifest")]
#[derive(Serialize, Deserialize, Clone)]
#[derive(Serialize, Deserialize, Clone, Debug)]
pub struct PyManifest {
pub catalog: String,
pub schema: String,
Expand Down Expand Up @@ -84,7 +84,7 @@ impl PyManifest {
}

#[pyclass(name = "Model")]
#[derive(Serialize, Deserialize)]
#[derive(Serialize, Deserialize, Debug)]
pub struct PyModel {
#[pyo3(get)]
pub name: String,
Expand Down Expand Up @@ -121,7 +121,7 @@ impl From<&Model> for PyModel {
name: model.name.clone(),
ref_sql: model.ref_sql.clone(),
base_object: model.base_object.clone(),
table_reference: model.table_reference.clone(),
table_reference: Some(String::from(model.table_reference())),
columns: model.columns.clone(),
primary_key: model.primary_key.clone(),
cached: model.cached,
Expand All @@ -131,7 +131,7 @@ impl From<&Model> for PyModel {
}

#[pyclass(name = "Column")]
#[derive(Serialize, Deserialize)]
#[derive(Serialize, Deserialize, Debug)]
pub struct PyColumn {
#[pyo3(get)]
pub name: String,
Expand Down Expand Up @@ -164,7 +164,7 @@ impl From<&Column> for PyColumn {
}

#[pyclass(name = "Relationship")]
#[derive(Serialize, Deserialize)]
#[derive(Serialize, Deserialize, Debug)]
pub struct PyRelationship {
#[pyo3(get)]
pub name: String,
Expand Down Expand Up @@ -195,7 +195,7 @@ impl From<&Relationship> for PyRelationship {
}

#[pyclass(name = "JoinType", eq)]
#[derive(Serialize, Deserialize, PartialEq, Eq)]
#[derive(Serialize, Deserialize, PartialEq, Eq, Debug)]
pub enum PyJoinType {
#[serde(alias = "one_to_one")]
OneToOne,
Expand All @@ -219,7 +219,7 @@ impl From<&JoinType> for PyJoinType {
}

#[pyclass(name = "Metric")]
#[derive(Serialize, Deserialize)]
#[derive(Serialize, Deserialize, Debug)]
pub struct PyMetric {
#[pyo3(get)]
pub name: String,
Expand Down Expand Up @@ -249,15 +249,15 @@ impl From<&Metric> for PyMetric {
}

#[pyclass(name = "TimeGrain")]
#[derive(Serialize, Deserialize)]
#[derive(Serialize, Deserialize, Debug)]
pub struct PyTimeGrain {
pub name: String,
pub ref_column: String,
pub date_parts: Vec<TimeUnit>,
}

#[pyclass(name = "TimeUnit", eq)]
#[derive(Serialize, Deserialize, PartialEq, Eq)]
#[derive(Serialize, Deserialize, PartialEq, Eq, Debug)]
pub enum PyTimeUnit {
Year,
Month,
Expand All @@ -268,7 +268,7 @@ pub enum PyTimeUnit {
}

#[pyclass(name = "View")]
#[derive(Serialize, Deserialize)]
#[derive(Serialize, Deserialize, Debug)]
pub struct PyView {
#[pyo3(get)]
pub name: String,
Expand Down

0 comments on commit 7cc2f01

Please sign in to comment.