-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e807a27
commit ee889b7
Showing
4 changed files
with
36 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
pub mod query; | ||
pub mod util; | ||
pub mod view; | ||
pub use util::setup_temp_db; | ||
|
||
pub mod errors; | ||
pub use errors::DatabaseError; | ||
|
||
pub mod database_components; | ||
pub use database_components::{Column, Columns, Row, Table}; | ||
|
||
pub mod query_operations; | ||
pub use query_operations::{Operation, Query}; | ||
|
||
pub mod database_operations; | ||
pub use database_operations::Database; | ||
|
||
pub use errors::DatabaseError; | ||
|
||
pub use query::{Operation, Query}; | ||
pub use util::setup_temp_db; | ||
pub mod view; | ||
pub use view::View; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
pub mod query; | ||
|
||
pub use query as query_operations; | ||
|
||
use serde::{Deserialize, Serialize}; | ||
use serde_json::Value; | ||
use std::path::PathBuf; | ||
|
||
#[derive(Debug, PartialEq, Serialize, Deserialize, Clone, Copy)] | ||
pub enum Operation { | ||
Create, | ||
Read, | ||
Update, | ||
Delete, | ||
} | ||
|
||
#[derive(Debug, PartialEq, Serialize, Deserialize, Clone)] | ||
pub struct Query { | ||
pub db_file_name: PathBuf, | ||
pub table_name: Option<String>, | ||
pub operation: Operation, | ||
pub update_data: Option<Value>, | ||
pub row_data: Option<Value>, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters