mssqlrust 1.0.2

Lightweight Rust library for Microsoft SQL Server using dataset and datatable
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use std::collections::HashMap;
use std::ops::Index;

use super::{DataCell, DataValue};

#[derive(Debug, Clone, PartialEq, Default)]
pub struct DataRow {
    pub cells: HashMap<String, DataCell>,
}

impl Index<&str> for DataRow {
    type Output = DataValue;

    fn index(&self, column: &str) -> &Self::Output {
        &self.cells.get(column).expect(&format!("Column '{}' not found", column)).value
    }
}