1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
mod auto_increment;
mod base;
mod mutable;

use {
	crate::{database::*, Result},
	odbc_api::Environment,
};

pub struct ODBCDatabase {
	environment: Environment,
	connection_string: String,
}

impl DBFull for ODBCDatabase {}

impl ODBCDatabase {
	pub fn new(connection_string: &str) -> Result<Self> {
		let environment = Environment::new()?;
		environment.connect_with_connection_string(connection_string)?; // Fail Fast
		let connection_string = connection_string.to_string();
		Ok(Self {
			environment,
			connection_string,
		})
	}
}