Skip to content

Commit

Permalink
Remove sea-query-attr from main
Browse files Browse the repository at this point in the history
  • Loading branch information
tyt2y3 committed Sep 28, 2024
1 parent f7a5c0a commit 0a6be65
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 14 deletions.
3 changes: 1 addition & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ path = "src/lib.rs"

[dependencies]
inherent = "1.0"
sea-query-attr = { version = "0.1.1", path = "sea-query-attr", default-features = false, optional = true }
sea-query-derive = { version = "0.4.0", path = "sea-query-derive", default-features = false, optional = true }
serde_json = { version = "1", default-features = false, optional = true, features = ["std"] }
educe = { version = "=0.5.11", default-features = false, optional = true, features = ["Hash", "PartialEq", "Eq"] }
Expand All @@ -56,7 +55,7 @@ backend-postgres = []
backend-sqlite = []
default = ["derive", "backend-mysql", "backend-postgres", "backend-sqlite"]
derive = ["sea-query-derive"]
attr = ["sea-query-attr"]
attr = []
hashable-value = ["educe", "ordered-float"]
postgres-array = []
postgres-vector = ["pgvector"]
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ SeaQuery is very lightweight, all dependencies are optional (except `inherent`).

### Feature flags

Macro: `derive` `attr`
Macro: `derive`

Async support: `thread-safe` (use `Arc` inplace of `Rc`)

Expand Down Expand Up @@ -247,7 +247,7 @@ assert_eq!(
r#"SELECT "character" FROM "character""#,
r#"WHERE ("size_w" + 1) * 2 = ("size_h" / 2) - 1"#,
r#"AND "size_w" IN (SELECT ln(2.4 ^ 1.2))"#,
r#"AND (("character" LIKE 'D') AND ("character" LIKE 'E'))"#,
r#"AND ("character" LIKE 'D' AND "character" LIKE 'E')"#,
]
.join(" ")
);
Expand Down Expand Up @@ -557,7 +557,7 @@ assert_eq!(
r#"CREATE TABLE IF NOT EXISTS "character" ("#,
r#""id" integer NOT NULL PRIMARY KEY AUTOINCREMENT,"#,
r#""font_size" integer NOT NULL,"#,
r#""character" text NOT NULL,"#,
r#""character" varchar NOT NULL,"#,
r#""size_w" integer NOT NULL,"#,
r#""size_h" integer NOT NULL,"#,
r#""font_id" integer DEFAULT NULL,"#,
Expand Down
3 changes: 3 additions & 0 deletions sea-query-attr/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[workspace]
# A separate workspace

[package]
name = "sea-query-attr"
version = "0.1.2"
Expand Down
17 changes: 8 additions & 9 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
//!
//! ### Feature flags
//!
//! Macro: `derive` `attr`
//! Macro: `derive`
//!
//! Async support: `thread-safe` (use `Arc` inplace of `Rc`)
//!
Expand Down Expand Up @@ -180,10 +180,9 @@
//! ```
//!
//! If you're okay with running another procedural macro, you can activate
//! the `derive` or `attr` feature on the crate to save you some boilerplate.
//! the `derive` feature on the crate to save you some boilerplate.
//! For more usage information, look at
//! [the derive examples](https://github.com/SeaQL/sea-query/tree/master/sea-query-derive/tests/pass)
//! or [the attribute examples](https://github.com/SeaQL/sea-query/tree/master/sea-query-attr/tests/pass).
//! [the derive examples](https://github.com/SeaQL/sea-query/tree/master/sea-query-derive/tests/pass).
//!
//! ```rust
//! #[cfg(feature = "derive")]
Expand All @@ -203,7 +202,7 @@
//! ```
//!
//! ```rust
//! #[cfg(feature = "attr")]
//! #[cfg(feature = "derive")]
//! # fn test() {
//! use sea_query::{enum_def, Iden};
//!
Expand All @@ -223,7 +222,7 @@
//! assert_eq!(CharacterIden::Table.to_string(), "character");
//! assert_eq!(CharacterIden::Foo.to_string(), "foo");
//! # }
//! # #[cfg(feature = "attr")]
//! # #[cfg(feature = "derive")]
//! # test();
//! ```
//!
Expand Down Expand Up @@ -846,7 +845,7 @@ pub use types::*;
pub use value::*;

#[cfg(feature = "derive")]
pub use sea_query_derive::{Iden, IdenStatic};
pub use sea_query_derive::{enum_def, Iden, IdenStatic};

#[cfg(feature = "attr")]
pub use sea_query_attr::enum_def;
#[cfg(all(feature = "attr", not(feature = "derive")))]
pub use sea_query_derive::enum_def;

0 comments on commit 0a6be65

Please sign in to comment.