Skip to content

Commit

Permalink
WIP: refactor mysql module to flatten its structure
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelff committed Nov 15, 2023
1 parent 485f6dc commit c987dce
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 14 deletions.
4 changes: 2 additions & 2 deletions quaint/src/connector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ pub use postgres::wasm::common::*;

#[cfg(feature = "mysql")]
pub(crate) mod mysql;
#[cfg(feature = "mysql")]
pub use mysql::*;
#[cfg(feature = "mysql-native")]
pub use mysql::native::*;
#[cfg(feature = "mysql")]
pub use mysql::wasm::common::*;

#[cfg(feature = "sqlite")]
pub(crate) mod sqlite;
Expand Down
11 changes: 7 additions & 4 deletions quaint/src/connector/mysql.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
pub use wasm::common::MysqlUrl;
pub use wasm::error::MysqlError;
//! Wasm-compatible definitions for the MySQL connector.
//! This module is only available with the `mysql` feature.
pub mod error;
pub(crate) mod url;

#[cfg(feature = "mysql")]
pub(crate) mod wasm;
pub use error::MysqlError;
pub use url::MysqlUrl;

#[cfg(feature = "mysql-native")]
pub(crate) mod native;

File renamed without changes.
2 changes: 1 addition & 1 deletion quaint/src/connector/mysql/native/error.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::{
connector::mysql::wasm::error::MysqlError,
connector::mysql::error::MysqlError,
error::{Error, ErrorKind},
};
use mysql_async as my;
Expand Down
2 changes: 1 addition & 1 deletion quaint/src/connector/mysql/native/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
mod conversion;
mod error;

pub(crate) use crate::connector::mysql::wasm::common::MysqlUrl;
pub(crate) use crate::connector::mysql::MysqlUrl;
use crate::connector::{timeout, IsolationLevel};

use crate::{
Expand Down
File renamed without changes.
6 changes: 0 additions & 6 deletions quaint/src/connector/mysql/wasm/mod.rs

This file was deleted.

0 comments on commit c987dce

Please sign in to comment.