Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into active-enum
Browse files Browse the repository at this point in the history
  • Loading branch information
billy1624 committed Oct 20, 2021
2 parents 868a469 + 43509af commit d525c71
Show file tree
Hide file tree
Showing 21 changed files with 493 additions and 73 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,14 +145,20 @@ jobs:
with:
command: test
args: >
--all
--workspace
- uses: actions-rs/cargo@v1
with:
command: test
args: >
--manifest-path sea-orm-rocket/Cargo.toml
- uses: actions-rs/cargo@v1
with:
command: test
args: >
--manifest-path sea-orm-cli/Cargo.toml
cli:
name: CLI
runs-on: ${{ matrix.os }}
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ assert_eq!(
))
);

// update many remains the same
assert_eq!(
Update::many(cake::Entity)
.col_expr(cake::Column::Name, Expr::value("Cheese Cake".to_owned()))
Expand Down
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ serde_json = { version = "^1", optional = true }
sqlx = { version = "^0.5", optional = true }
uuid = { version = "0.8", features = ["serde", "v4"], optional = true }
ouroboros = "0.11"
url = "^2.2"

[dev-dependencies]
smol = { version = "^1.2" }
Expand Down
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@

<h1>SeaORM</h1>

<p>
<strong>🐚 An async & dynamic ORM for Rust</strong>
</p>
<h3>🐚 An async & dynamic ORM for Rust</h3>

[![crate](https://img.shields.io/crates/v/sea-orm.svg)](https://crates.io/crates/sea-orm)
[![docs](https://docs.rs/sea-orm/badge.svg)](https://docs.rs/sea-orm)
Expand All @@ -18,7 +16,7 @@

# SeaORM

SeaORM is a relational ORM to help you build light weight and concurrent web services in Rust.
#### SeaORM is a relational ORM to help you build light weight and concurrent web services in Rust.

[![Getting Started](https://img.shields.io/badge/Getting%20Started-brightgreen)](https://www.sea-ql.org/SeaORM/docs/index)
[![Usage Example](https://img.shields.io/badge/Usage%20Example-yellow)](https://github.com/SeaQL/sea-orm/tree/master/examples/basic)
Expand Down
11 changes: 1 addition & 10 deletions issues/249/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,2 @@
[workspace]
# A separate workspace

[package]
name = "sea-orm-issues-249"
version = "0.1.0"
edition = "2018"
publish = false

[dependencies]
sea-orm = { path = "../../", default-features = false, features = ["mock"] }
members = ["core", "app"]
1 change: 1 addition & 0 deletions issues/249/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Demo of a pure logic crate depending on SeaORM with no enabled features
9 changes: 9 additions & 0 deletions issues/249/app/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[package]
name = "sea-orm-issues-249-app"
version = "0.1.0"
edition = "2018"
publish = false

[dependencies]
core = { path = "../core" }
sea-orm = { path = "../../../", default-features = false, features = ["macros", "sqlx-sqlite", "runtime-async-std-native-tls"] }
14 changes: 14 additions & 0 deletions issues/249/app/src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
use core::clone_a_model;

use sea_orm::tests_cfg::cake;

fn main() {
let c1 = cake::Model {
id: 1,
name: "Cheese".to_owned(),
};

let c2 = clone_a_model(&c1);

println!("{:?}", c2);
}
11 changes: 11 additions & 0 deletions issues/249/core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[package]
name = "core"
version = "0.1.0"
edition = "2018"
publish = false

[dependencies]
sea-orm = { path = "../../../", default-features = false }

[dev-dependencies]
sea-orm = { path = "../../../", features = ["mock"] }
17 changes: 17 additions & 0 deletions issues/249/core/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
pub use sea_orm::entity::*;

pub fn clone_a_model<M>(model: &M) -> M
where
M: ModelTrait {
model.clone()
}

#[cfg(test)]
mod tests {
use super::*;

#[test]
fn test() {
println!("OK");
}
}
Empty file removed issues/249/src/lib.rs
Empty file.
4 changes: 4 additions & 0 deletions sea-orm-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ sea-schema = { version = "^0.2.9", default-features = false, features = [
sqlx = { version = "^0.5", default-features = false, features = [ "mysql", "postgres" ] }
env_logger = { version = "^0.9" }
log = { version = "^0.4" }
url = "^2.2"

[dev-dependencies]
smol = "1.2.5"

[features]
default = [ "runtime-async-std-native-tls" ]
Expand Down
Loading

0 comments on commit d525c71

Please sign in to comment.