From b7415820f5dc3ba92521df1a62054c654011743b Mon Sep 17 00:00:00 2001 From: Billy Chan Date: Fri, 13 May 2022 16:13:22 +0800 Subject: [PATCH] Examples: entity & application crate depends on SeaORM with minimum required features enabled --- examples/actix3_example/Cargo.toml | 11 +++++++++++ examples/actix3_example/README.md | 2 +- examples/actix3_example/entity/Cargo.toml | 8 -------- examples/actix3_example/entity/src/lib.rs | 2 -- examples/actix3_example/src/main.rs | 1 - examples/actix_example/Cargo.toml | 11 +++++++++++ examples/actix_example/README.md | 2 +- examples/actix_example/entity/Cargo.toml | 8 -------- examples/actix_example/entity/src/lib.rs | 2 -- examples/actix_example/src/main.rs | 1 - examples/axum_example/Cargo.toml | 11 +++++++++++ examples/axum_example/README.md | 2 +- examples/axum_example/entity/Cargo.toml | 8 -------- examples/axum_example/entity/src/lib.rs | 2 -- examples/axum_example/src/main.rs | 1 - examples/graphql_example/Cargo.toml | 10 ++++++++++ examples/graphql_example/README.md | 2 +- examples/graphql_example/entity/Cargo.toml | 7 ------- examples/graphql_example/entity/src/lib.rs | 1 - .../migration/src/m20220101_000001_create_table.rs | 6 ++---- examples/graphql_example/src/db.rs | 1 - .../graphql_example/src/graphql/mutation/note.rs | 2 +- examples/graphql_example/src/graphql/query/note.rs | 3 ++- examples/jsonrpsee_example/Cargo.toml | 13 ++++++++++++- examples/jsonrpsee_example/README.md | 2 +- examples/jsonrpsee_example/entity/Cargo.toml | 8 -------- examples/jsonrpsee_example/entity/src/lib.rs | 2 -- examples/jsonrpsee_example/src/main.rs | 1 - examples/poem_example/Cargo.toml | 11 +++++++++++ examples/poem_example/README.md | 2 +- examples/poem_example/entity/Cargo.toml | 8 -------- examples/poem_example/entity/src/lib.rs | 2 -- examples/poem_example/src/main.rs | 1 - examples/rocket_example/Cargo.toml | 10 ++++++++++ examples/rocket_example/README.md | 2 +- examples/rocket_example/entity/Cargo.toml | 7 ------- examples/rocket_example/entity/src/lib.rs | 2 -- examples/rocket_example/src/main.rs | 1 - examples/rocket_example/src/pool.rs | 1 - examples/tonic_example/Cargo.toml | 11 +++++++++++ examples/tonic_example/entity/Cargo.toml | 8 -------- examples/tonic_example/entity/src/lib.rs | 2 -- examples/tonic_example/src/server.rs | 6 ++---- 43 files changed, 101 insertions(+), 103 deletions(-) diff --git a/examples/actix3_example/Cargo.toml b/examples/actix3_example/Cargo.toml index 11d2915a9..fd14fbc87 100644 --- a/examples/actix3_example/Cargo.toml +++ b/examples/actix3_example/Cargo.toml @@ -22,3 +22,14 @@ serde = "1" tracing-subscriber = { version = "0.3", features = ["env-filter"] } entity = { path = "entity" } migration = { path = "migration" } + +[dependencies.sea-orm] +path = "../../" # remove this line in your own project +version = "^0.8.0" +features = [ + "debug-print", + "runtime-async-std-native-tls", + "sqlx-mysql", + # "sqlx-postgres", + # "sqlx-sqlite", +] diff --git a/examples/actix3_example/README.md b/examples/actix3_example/README.md index ec9e1fee6..2cd8c3584 100644 --- a/examples/actix3_example/README.md +++ b/examples/actix3_example/README.md @@ -6,7 +6,7 @@ 1. Modify the `DATABASE_URL` var in `.env` to point to your chosen database -1. Turn on the appropriate database feature for your chosen db in `entity/Cargo.toml` (the `"sqlx-mysql",` line) +1. Turn on the appropriate database feature for your chosen db in `Cargo.toml` (the `"sqlx-mysql",` line) 1. Execute `cargo run` to start the server diff --git a/examples/actix3_example/entity/Cargo.toml b/examples/actix3_example/entity/Cargo.toml index 1a2138b2c..ba8a985bf 100644 --- a/examples/actix3_example/entity/Cargo.toml +++ b/examples/actix3_example/entity/Cargo.toml @@ -14,11 +14,3 @@ serde = { version = "1", features = ["derive"] } [dependencies.sea-orm] path = "../../../" # remove this line in your own project version = "^0.8.0" -features = [ - "macros", - "debug-print", - "runtime-async-std-native-tls", - "sqlx-mysql", - # "sqlx-postgres", - # "sqlx-sqlite", -] \ No newline at end of file diff --git a/examples/actix3_example/entity/src/lib.rs b/examples/actix3_example/entity/src/lib.rs index 263f05b42..e8b6291ac 100644 --- a/examples/actix3_example/entity/src/lib.rs +++ b/examples/actix3_example/entity/src/lib.rs @@ -1,3 +1 @@ pub mod post; - -pub use sea_orm; diff --git a/examples/actix3_example/src/main.rs b/examples/actix3_example/src/main.rs index b3f44a782..1a6a70223 100644 --- a/examples/actix3_example/src/main.rs +++ b/examples/actix3_example/src/main.rs @@ -5,7 +5,6 @@ use actix_web::{ use entity::post; use entity::post::Entity as Post; -use entity::sea_orm; use listenfd::ListenFd; use migration::{Migrator, MigratorTrait}; use sea_orm::DatabaseConnection; diff --git a/examples/actix_example/Cargo.toml b/examples/actix_example/Cargo.toml index 578d72af8..7681121c2 100644 --- a/examples/actix_example/Cargo.toml +++ b/examples/actix_example/Cargo.toml @@ -22,3 +22,14 @@ serde = "1" tracing-subscriber = { version = "0.3", features = ["env-filter"] } entity = { path = "entity" } migration = { path = "migration" } + +[dependencies.sea-orm] +path = "../../" # remove this line in your own project +version = "^0.8.0" +features = [ + "debug-print", + "runtime-actix-native-tls", + "sqlx-mysql", + # "sqlx-postgres", + # "sqlx-sqlite", +] diff --git a/examples/actix_example/README.md b/examples/actix_example/README.md index c37fdfe06..c7ad2171e 100644 --- a/examples/actix_example/README.md +++ b/examples/actix_example/README.md @@ -4,7 +4,7 @@ 1. Modify the `DATABASE_URL` var in `.env` to point to your chosen database -1. Turn on the appropriate database feature for your chosen db in `entity/Cargo.toml` (the `"sqlx-mysql",` line) +1. Turn on the appropriate database feature for your chosen db in `Cargo.toml` (the `"sqlx-mysql",` line) 1. Execute `cargo run` to start the server diff --git a/examples/actix_example/entity/Cargo.toml b/examples/actix_example/entity/Cargo.toml index f09c13947..ba8a985bf 100644 --- a/examples/actix_example/entity/Cargo.toml +++ b/examples/actix_example/entity/Cargo.toml @@ -14,11 +14,3 @@ serde = { version = "1", features = ["derive"] } [dependencies.sea-orm] path = "../../../" # remove this line in your own project version = "^0.8.0" -features = [ - "macros", - "debug-print", - "runtime-actix-native-tls", - "sqlx-mysql", - # "sqlx-postgres", - # "sqlx-sqlite", -] \ No newline at end of file diff --git a/examples/actix_example/entity/src/lib.rs b/examples/actix_example/entity/src/lib.rs index 263f05b42..e8b6291ac 100644 --- a/examples/actix_example/entity/src/lib.rs +++ b/examples/actix_example/entity/src/lib.rs @@ -1,3 +1 @@ pub mod post; - -pub use sea_orm; diff --git a/examples/actix_example/src/main.rs b/examples/actix_example/src/main.rs index dd100fef2..ec24095aa 100644 --- a/examples/actix_example/src/main.rs +++ b/examples/actix_example/src/main.rs @@ -5,7 +5,6 @@ use actix_web::{ use entity::post; use entity::post::Entity as Post; -use entity::sea_orm; use listenfd::ListenFd; use migration::{Migrator, MigratorTrait}; use sea_orm::DatabaseConnection; diff --git a/examples/axum_example/Cargo.toml b/examples/axum_example/Cargo.toml index ffcd167c7..6538d6c2d 100644 --- a/examples/axum_example/Cargo.toml +++ b/examples/axum_example/Cargo.toml @@ -23,3 +23,14 @@ tera = "1.15.0" tracing-subscriber = { version = "0.3.11", features = ["env-filter"] } entity = { path = "entity" } migration = { path = "migration" } + +[dependencies.sea-orm] +path = "../../" # remove this line in your own project +version = "^0.8.0" +features = [ + "debug-print", + "runtime-tokio-native-tls", + "sqlx-postgres", + # "sqlx-mysql", + # "sqlx-sqlite", +] diff --git a/examples/axum_example/README.md b/examples/axum_example/README.md index 8ed1e7892..a3c624225 100644 --- a/examples/axum_example/README.md +++ b/examples/axum_example/README.md @@ -4,7 +4,7 @@ 1. Modify the `DATABASE_URL` var in `.env` to point to your chosen database -1. Turn on the appropriate database feature for your chosen db in `entity/Cargo.toml` (the `"sqlx-postgres",` line) +1. Turn on the appropriate database feature for your chosen db in `Cargo.toml` (the `"sqlx-postgres",` line) 1. Execute `cargo run` to start the server diff --git a/examples/axum_example/entity/Cargo.toml b/examples/axum_example/entity/Cargo.toml index da87e3f58..ba8a985bf 100644 --- a/examples/axum_example/entity/Cargo.toml +++ b/examples/axum_example/entity/Cargo.toml @@ -14,11 +14,3 @@ serde = { version = "1", features = ["derive"] } [dependencies.sea-orm] path = "../../../" # remove this line in your own project version = "^0.8.0" -features = [ - "macros", - "debug-print", - "runtime-tokio-native-tls", - "sqlx-postgres", - # "sqlx-mysql", - # "sqlx-sqlite", -] \ No newline at end of file diff --git a/examples/axum_example/entity/src/lib.rs b/examples/axum_example/entity/src/lib.rs index 263f05b42..e8b6291ac 100644 --- a/examples/axum_example/entity/src/lib.rs +++ b/examples/axum_example/entity/src/lib.rs @@ -1,3 +1 @@ pub mod post; - -pub use sea_orm; diff --git a/examples/axum_example/src/main.rs b/examples/axum_example/src/main.rs index 9875ab8b2..37fc52c31 100644 --- a/examples/axum_example/src/main.rs +++ b/examples/axum_example/src/main.rs @@ -8,7 +8,6 @@ use axum::{ Router, Server, }; use entity::post; -use entity::sea_orm; use flash::{get_flash_cookie, post_response, PostResponse}; use migration::{Migrator, MigratorTrait}; use post::Entity as Post; diff --git a/examples/graphql_example/Cargo.toml b/examples/graphql_example/Cargo.toml index 6b1de9ec4..d7659c867 100644 --- a/examples/graphql_example/Cargo.toml +++ b/examples/graphql_example/Cargo.toml @@ -16,3 +16,13 @@ dotenv = "0.15.0" async-graphql-axum = "^3.0.38" entity = { path = "entity" } migration = { path = "migration" } + +[dependencies.sea-orm] +path = "../../" # remove this line in your own project +version = "^0.8.0" +features = [ + "runtime-tokio-native-tls", + # "sqlx-postgres", + # "sqlx-mysql", + "sqlx-sqlite" +] diff --git a/examples/graphql_example/README.md b/examples/graphql_example/README.md index 9111c7cc1..88501958d 100644 --- a/examples/graphql_example/README.md +++ b/examples/graphql_example/README.md @@ -6,7 +6,7 @@ 1. Modify the `DATABASE_URL` var in `.env` to point to your chosen database -1. Turn on the appropriate database feature for your chosen db in `entity/Cargo.toml` (the `"sqlx-sqlite",` line) +1. Turn on the appropriate database feature for your chosen db in `Cargo.toml` (the `"sqlx-sqlite",` line) 1. Execute `cargo run` to start the server diff --git a/examples/graphql_example/entity/Cargo.toml b/examples/graphql_example/entity/Cargo.toml index 50601b4a7..09bc785a3 100644 --- a/examples/graphql_example/entity/Cargo.toml +++ b/examples/graphql_example/entity/Cargo.toml @@ -17,10 +17,3 @@ version = "^3.0.38" [dependencies.sea-orm] path = "../../../" # remove this line in your own project version = "^0.8.0" -features = [ - "macros", - "runtime-tokio-native-tls", - # "sqlx-postgres", - # "sqlx-mysql", - "sqlx-sqlite" -] \ No newline at end of file diff --git a/examples/graphql_example/entity/src/lib.rs b/examples/graphql_example/entity/src/lib.rs index e9cf63e58..d87caf39c 100644 --- a/examples/graphql_example/entity/src/lib.rs +++ b/examples/graphql_example/entity/src/lib.rs @@ -1,4 +1,3 @@ pub mod note; pub use async_graphql; -pub use sea_orm; diff --git a/examples/graphql_example/migration/src/m20220101_000001_create_table.rs b/examples/graphql_example/migration/src/m20220101_000001_create_table.rs index 42278d2c2..9a69fe7a6 100644 --- a/examples/graphql_example/migration/src/m20220101_000001_create_table.rs +++ b/examples/graphql_example/migration/src/m20220101_000001_create_table.rs @@ -1,8 +1,6 @@ +use entity::note; +use sea_orm::{DbBackend, EntityTrait, Schema}; use sea_orm_migration::prelude::*; -use entity::{ - note, - sea_orm::{DbBackend, EntityTrait, Schema}, -}; pub struct Migration; diff --git a/examples/graphql_example/src/db.rs b/examples/graphql_example/src/db.rs index da323597d..3cc41e27b 100644 --- a/examples/graphql_example/src/db.rs +++ b/examples/graphql_example/src/db.rs @@ -1,4 +1,3 @@ -use entity::sea_orm; use sea_orm::DatabaseConnection; pub struct Database { diff --git a/examples/graphql_example/src/graphql/mutation/note.rs b/examples/graphql_example/src/graphql/mutation/note.rs index 0ead996f5..600b462b8 100644 --- a/examples/graphql_example/src/graphql/mutation/note.rs +++ b/examples/graphql_example/src/graphql/mutation/note.rs @@ -1,7 +1,7 @@ use async_graphql::{Context, Object, Result}; use entity::async_graphql::{self, InputObject, SimpleObject}; use entity::note; -use entity::sea_orm::{ActiveModelTrait, Set}; +use sea_orm::{ActiveModelTrait, Set}; use crate::db::Database; diff --git a/examples/graphql_example/src/graphql/query/note.rs b/examples/graphql_example/src/graphql/query/note.rs index 1ab1e760e..696d47206 100644 --- a/examples/graphql_example/src/graphql/query/note.rs +++ b/examples/graphql_example/src/graphql/query/note.rs @@ -1,5 +1,6 @@ use async_graphql::{Context, Object, Result}; -use entity::{async_graphql, note, sea_orm::EntityTrait}; +use entity::{async_graphql, note}; +use sea_orm::EntityTrait; use crate::db::Database; diff --git a/examples/jsonrpsee_example/Cargo.toml b/examples/jsonrpsee_example/Cargo.toml index 6bdd71b3d..560b0f17d 100644 --- a/examples/jsonrpsee_example/Cargo.toml +++ b/examples/jsonrpsee_example/Cargo.toml @@ -19,4 +19,15 @@ migration = { path = "migration" } anyhow = "1.0.52" async-trait = "0.1.52" log = { version = "0.4", features = ["std"] } -simplelog = "*" \ No newline at end of file +simplelog = "*" + +[dependencies.sea-orm] +path = "../../" # remove this line in your own project +version = "^0.8.0" +features = [ + "debug-print", + "runtime-tokio-native-tls", + "sqlx-sqlite", + # "sqlx-postgres", + # "sqlx-mysql", +] diff --git a/examples/jsonrpsee_example/README.md b/examples/jsonrpsee_example/README.md index be4c78ca7..804893319 100644 --- a/examples/jsonrpsee_example/README.md +++ b/examples/jsonrpsee_example/README.md @@ -2,7 +2,7 @@ 1. Modify the `DATABASE_URL` var in `.env` to point to your chosen database -1. Turn on the appropriate database feature for your chosen db in `entity/Cargo.toml` (the `"sqlx-sqlite",` line) +1. Turn on the appropriate database feature for your chosen db in `Cargo.toml` (the `"sqlx-sqlite",` line) 1. Execute `cargo run` to start the server diff --git a/examples/jsonrpsee_example/entity/Cargo.toml b/examples/jsonrpsee_example/entity/Cargo.toml index 244b8c0e5..ba8a985bf 100644 --- a/examples/jsonrpsee_example/entity/Cargo.toml +++ b/examples/jsonrpsee_example/entity/Cargo.toml @@ -14,11 +14,3 @@ serde = { version = "1", features = ["derive"] } [dependencies.sea-orm] path = "../../../" # remove this line in your own project version = "^0.8.0" -features = [ - "macros", - "debug-print", - "runtime-tokio-native-tls", - "sqlx-sqlite", - # "sqlx-postgres", - # "sqlx-mysql", -] \ No newline at end of file diff --git a/examples/jsonrpsee_example/entity/src/lib.rs b/examples/jsonrpsee_example/entity/src/lib.rs index 263f05b42..e8b6291ac 100644 --- a/examples/jsonrpsee_example/entity/src/lib.rs +++ b/examples/jsonrpsee_example/entity/src/lib.rs @@ -1,3 +1 @@ pub mod post; - -pub use sea_orm; diff --git a/examples/jsonrpsee_example/src/main.rs b/examples/jsonrpsee_example/src/main.rs index 93474cbcc..a2cf18e37 100644 --- a/examples/jsonrpsee_example/src/main.rs +++ b/examples/jsonrpsee_example/src/main.rs @@ -2,7 +2,6 @@ use std::env; use anyhow::anyhow; use entity::post; -use entity::sea_orm; use jsonrpsee::core::{async_trait, RpcResult}; use jsonrpsee::http_server::HttpServerBuilder; use jsonrpsee::proc_macros::rpc; diff --git a/examples/poem_example/Cargo.toml b/examples/poem_example/Cargo.toml index 7b1097925..fa5931a8a 100644 --- a/examples/poem_example/Cargo.toml +++ b/examples/poem_example/Cargo.toml @@ -16,3 +16,14 @@ tera = "1.8.0" dotenv = "0.15" entity = { path = "entity" } migration = { path = "migration" } + +[dependencies.sea-orm] +path = "../../" # remove this line in your own project +version = "^0.8.0" +features = [ + "debug-print", + "runtime-tokio-native-tls", + "sqlx-sqlite", + # "sqlx-postgres", + # "sqlx-mysql", +] diff --git a/examples/poem_example/README.md b/examples/poem_example/README.md index b9ec2d3e0..bd4a45398 100644 --- a/examples/poem_example/README.md +++ b/examples/poem_example/README.md @@ -4,7 +4,7 @@ 1. Modify the `DATABASE_URL` var in `.env` to point to your chosen database -1. Turn on the appropriate database feature for your chosen db in `entity/Cargo.toml` (the `"sqlx-sqlite",` line) +1. Turn on the appropriate database feature for your chosen db in `Cargo.toml` (the `"sqlx-sqlite",` line) 1. Execute `cargo run` to start the server diff --git a/examples/poem_example/entity/Cargo.toml b/examples/poem_example/entity/Cargo.toml index 244b8c0e5..ba8a985bf 100644 --- a/examples/poem_example/entity/Cargo.toml +++ b/examples/poem_example/entity/Cargo.toml @@ -14,11 +14,3 @@ serde = { version = "1", features = ["derive"] } [dependencies.sea-orm] path = "../../../" # remove this line in your own project version = "^0.8.0" -features = [ - "macros", - "debug-print", - "runtime-tokio-native-tls", - "sqlx-sqlite", - # "sqlx-postgres", - # "sqlx-mysql", -] \ No newline at end of file diff --git a/examples/poem_example/entity/src/lib.rs b/examples/poem_example/entity/src/lib.rs index 263f05b42..e8b6291ac 100644 --- a/examples/poem_example/entity/src/lib.rs +++ b/examples/poem_example/entity/src/lib.rs @@ -1,3 +1 @@ pub mod post; - -pub use sea_orm; diff --git a/examples/poem_example/src/main.rs b/examples/poem_example/src/main.rs index f2a826ab7..75c5f776f 100644 --- a/examples/poem_example/src/main.rs +++ b/examples/poem_example/src/main.rs @@ -1,7 +1,6 @@ use std::env; use entity::post; -use entity::sea_orm; use migration::{Migrator, MigratorTrait}; use poem::endpoint::StaticFilesEndpoint; use poem::error::{BadRequest, InternalServerError}; diff --git a/examples/rocket_example/Cargo.toml b/examples/rocket_example/Cargo.toml index 7badb27c6..e91760493 100644 --- a/examples/rocket_example/Cargo.toml +++ b/examples/rocket_example/Cargo.toml @@ -26,3 +26,13 @@ migration = { path = "migration" } [dependencies.sea-orm-rocket] path = "../../sea-orm-rocket/lib" # remove this line in your own project and use the git line # git = "https://github.com/SeaQL/sea-orm" + +[dependencies.sea-orm] +path = "../../" # remove this line in your own project +version = "^0.8.0" +features = [ + "runtime-tokio-native-tls", + "sqlx-postgres", + # "sqlx-mysql", + # "sqlx-sqlite", +] diff --git a/examples/rocket_example/README.md b/examples/rocket_example/README.md index 6ef30ea6c..a1e3af0fa 100644 --- a/examples/rocket_example/README.md +++ b/examples/rocket_example/README.md @@ -4,7 +4,7 @@ 1. Modify the `url` var in `Rocket.toml` to point to your chosen database -1. Turn on the appropriate database feature for your chosen db in `entity/Cargo.toml` (the `"sqlx-postgres",` line) +1. Turn on the appropriate database feature for your chosen db in `Cargo.toml` (the `"sqlx-postgres",` line) 1. Execute `cargo run` to start the server diff --git a/examples/rocket_example/entity/Cargo.toml b/examples/rocket_example/entity/Cargo.toml index f2fb3e4be..c2c09608d 100644 --- a/examples/rocket_example/entity/Cargo.toml +++ b/examples/rocket_example/entity/Cargo.toml @@ -16,10 +16,3 @@ rocket = { version = "0.5.0-rc.1", features = [ [dependencies.sea-orm] path = "../../../" # remove this line in your own project version = "^0.8.0" -features = [ - "macros", - "runtime-tokio-native-tls", - "sqlx-postgres", - # "sqlx-mysql", - # "sqlx-sqlite", -] \ No newline at end of file diff --git a/examples/rocket_example/entity/src/lib.rs b/examples/rocket_example/entity/src/lib.rs index e15a5ab1d..06480a10b 100644 --- a/examples/rocket_example/entity/src/lib.rs +++ b/examples/rocket_example/entity/src/lib.rs @@ -2,5 +2,3 @@ extern crate rocket; pub mod post; - -pub use sea_orm; diff --git a/examples/rocket_example/src/main.rs b/examples/rocket_example/src/main.rs index 13944e26e..fed44f96a 100644 --- a/examples/rocket_example/src/main.rs +++ b/examples/rocket_example/src/main.rs @@ -10,7 +10,6 @@ use rocket::{Build, Request, Rocket}; use rocket_dyn_templates::Template; use serde_json::json; -use entity::sea_orm; use migration::MigratorTrait; use sea_orm::{entity::*, query::*}; use sea_orm_rocket::{Connection, Database}; diff --git a/examples/rocket_example/src/pool.rs b/examples/rocket_example/src/pool.rs index adf5afb7c..fe5f8c6eb 100644 --- a/examples/rocket_example/src/pool.rs +++ b/examples/rocket_example/src/pool.rs @@ -1,5 +1,4 @@ use async_trait::async_trait; -use entity::sea_orm; use sea_orm::ConnectOptions; use sea_orm_rocket::{rocket::figment::Figment, Config, Database}; use std::time::Duration; diff --git a/examples/tonic_example/Cargo.toml b/examples/tonic_example/Cargo.toml index 64620a1c8..e27200537 100644 --- a/examples/tonic_example/Cargo.toml +++ b/examples/tonic_example/Cargo.toml @@ -17,6 +17,17 @@ migration = { path = "migration" } prost = "0.10.0" serde = "1.0" +[dependencies.sea-orm] +path = "../../" # remove this line in your own project +version = "^0.8.0" +features = [ + "debug-print", + "runtime-tokio-rustls", + # "sqlx-mysql", + "sqlx-postgres", + # "sqlx-sqlite", +] + [lib] path = "./src/lib.rs" diff --git a/examples/tonic_example/entity/Cargo.toml b/examples/tonic_example/entity/Cargo.toml index 997f29933..ba8a985bf 100644 --- a/examples/tonic_example/entity/Cargo.toml +++ b/examples/tonic_example/entity/Cargo.toml @@ -14,11 +14,3 @@ serde = { version = "1", features = ["derive"] } [dependencies.sea-orm] path = "../../../" # remove this line in your own project version = "^0.8.0" -features = [ - "macros", - "debug-print", - "runtime-tokio-rustls", - # "sqlx-mysql", - "sqlx-postgres", - # "sqlx-sqlite", -] \ No newline at end of file diff --git a/examples/tonic_example/entity/src/lib.rs b/examples/tonic_example/entity/src/lib.rs index 263f05b42..e8b6291ac 100644 --- a/examples/tonic_example/entity/src/lib.rs +++ b/examples/tonic_example/entity/src/lib.rs @@ -1,3 +1 @@ pub mod post; - -pub use sea_orm; diff --git a/examples/tonic_example/src/server.rs b/examples/tonic_example/src/server.rs index c51ebb10f..0857ac7b9 100644 --- a/examples/tonic_example/src/server.rs +++ b/examples/tonic_example/src/server.rs @@ -6,11 +6,9 @@ use sea_orm_tonic_example::post::{ Post, PostId, PostList, PostPerPage, ProcessStatus, }; -use entity::{ - post::{self, Entity as PostEntity}, - sea_orm::{self, entity::*, query::*, DatabaseConnection}, -}; +use entity::post::{self, Entity as PostEntity}; use migration::{Migrator, MigratorTrait}; +use sea_orm::{self, entity::*, query::*, DatabaseConnection}; use std::env;