datafusion_table_providers/
lib.rs1use serde::{Deserialize, Serialize};
2use snafu::prelude::*;
3
4pub mod common;
5pub mod sql;
6pub mod util;
7
8#[cfg(feature = "duckdb")]
9pub mod duckdb;
10#[cfg(feature = "flight")]
11pub mod flight;
12#[cfg(feature = "mysql")]
13pub mod mysql;
14#[cfg(feature = "odbc")]
15pub mod odbc;
16#[cfg(feature = "postgres")]
17pub mod postgres;
18#[cfg(feature = "sqlite")]
19pub mod sqlite;
20
21#[derive(Debug, Snafu)]
22pub enum Error {
23 #[snafu(display("The database file path is not within the current directory: {path}"))]
24 FileNotInDirectory { path: String },
25 #[snafu(display("The database file is a symlink: {path}"))]
26 FileIsSymlink { path: String },
27 #[snafu(display("Error reading file: {source}"))]
28 FileReadError { source: std::io::Error },
29}
30
31#[derive(PartialEq, Eq, Clone, Copy, Default, Debug, Serialize, Deserialize)]
32#[serde(rename_all = "lowercase")]
33pub enum UnsupportedTypeAction {
34 #[default]
36 Error,
37 Warn,
39 Ignore,
41 String,
43}