use crate::database::schema::Schema;
use serde::{Deserialize, Serialize};
use std::sync::Arc;

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Stem {
  pub r#type: String,
  #[serde(skip_serializing_if = "Option::is_none")]
  pub relation: Option<String>,

  // The actual database schema node mapping for
  // O(1) jump table execution for queryer.
  //
  // Automatically skipped from `jspg_stems()` JSON payload output.
  #[serde(skip)]
  pub schema: Arc<Schema>,
}
