1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
use crate::field_type::FieldType;

use serde::{Deserialize, Serialize};

/// A database column, used in resultsets and schema info
#[derive(Clone, derive_more::Constructor, Debug, Deserialize, Serialize)]
pub struct Column {
  name: String,
  t: FieldType
}

impl Column {
  pub fn name(&self) -> &String {
    &self.name
  }

  pub fn t(&self) -> &FieldType {
    &self.t
  }
}