Skip to content

Commit

Permalink
Merge pull request #307 from SeaQL/paginator-trait-continue
Browse files Browse the repository at this point in the history
Continue `PaginatorTrait`
  • Loading branch information
tyt2y3 authored Nov 11, 2021
2 parents 1905f62 + a95d99e commit 64c54f8
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion examples/actix4_example/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use actix_web::{

use listenfd::ListenFd;
use sea_orm::DatabaseConnection;
use sea_orm::{entity::*, query::*, PaginatorTrait};
use sea_orm::{entity::*, query::*};
use serde::{Deserialize, Serialize};
use std::env;
use tera::Tera;
Expand Down
2 changes: 1 addition & 1 deletion examples/actix_example/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use actix_web::{
};
use listenfd::ListenFd;
use sea_orm::DatabaseConnection;
use sea_orm::{entity::*, query::*, PaginatorTrait};
use sea_orm::{entity::*, query::*};
use serde::{Deserialize, Serialize};
use std::env;
use tera::Tera;
Expand Down
2 changes: 1 addition & 1 deletion examples/axum_example/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use axum::{
};
use flash::{get_flash_cookie, post_response, PostResponse};
use post::Entity as Post;
use sea_orm::{prelude::*, Database, QueryOrder, Set, PaginatorTrait};
use sea_orm::{prelude::*, Database, QueryOrder, Set};
use serde::{Deserialize, Serialize};
use std::str::FromStr;
use std::{env, net::SocketAddr};
Expand Down
2 changes: 1 addition & 1 deletion examples/basic/src/select.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use super::*;
use sea_orm::{entity::*, error::*, query::*, DbConn, FromQueryResult, PaginatorTrait};
use sea_orm::{entity::*, error::*, query::*, DbConn, FromQueryResult};

pub async fn all_about_select(db: &DbConn) -> Result<(), DbErr> {
find_all(db).await?;
Expand Down
2 changes: 1 addition & 1 deletion examples/rocket_example/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use rocket::response::{Flash, Redirect};
use rocket::{Build, Request, Rocket};
use rocket_dyn_templates::{context, Template};

use sea_orm::{entity::*, query::*, PaginatorTrait};
use sea_orm::{entity::*, query::*};
use sea_orm_rocket::{Connection, Database};

mod pool;
Expand Down
4 changes: 2 additions & 2 deletions src/entity/prelude.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
pub use crate::{
error::*, ActiveEnum, ActiveModelBehavior, ActiveModelTrait, ColumnDef, ColumnTrait,
ColumnType, DatabaseConnection, DbConn, EntityName, EntityTrait, EnumIter, ForeignKeyAction,
Iden, IdenStatic, Linked, ModelTrait, PrimaryKeyToColumn, PrimaryKeyTrait, QueryFilter,
QueryResult, Related, RelationDef, RelationTrait, Select, Value,
Iden, IdenStatic, Linked, ModelTrait, PaginatorTrait, PrimaryKeyToColumn, PrimaryKeyTrait,
QueryFilter, QueryResult, Related, RelationDef, RelationTrait, Select, Value,
};

#[cfg(feature = "macros")]
Expand Down
4 changes: 2 additions & 2 deletions src/executor/paginator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ where
///
/// ```rust
/// # #[cfg(feature = "mock")]
/// # use sea_orm::{error::*, MockDatabase, DbBackend, PaginatorTrait};
/// # use sea_orm::{error::*, MockDatabase, DbBackend};
/// # let owned_db = MockDatabase::new(DbBackend::Postgres).into_connection();
/// # let db = &owned_db;
/// # let _: Result<(), DbErr> = smol::block_on(async {
Expand Down Expand Up @@ -126,7 +126,7 @@ where
///
/// ```rust
/// # #[cfg(feature = "mock")]
/// # use sea_orm::{error::*, MockDatabase, DbBackend, PaginatorTrait};
/// # use sea_orm::{error::*, MockDatabase, DbBackend};
/// # let owned_db = MockDatabase::new(DbBackend::Postgres).into_connection();
/// # let db = &owned_db;
/// # let _: Result<(), DbErr> = smol::block_on(async {
Expand Down
4 changes: 3 additions & 1 deletion src/query/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,6 @@ pub use traits::*;
pub use update::*;
pub use util::*;

pub use crate::{ConnectionTrait, InsertResult, Statement, UpdateResult, Value, Values};
pub use crate::{
ConnectionTrait, InsertResult, PaginatorTrait, Statement, UpdateResult, Value, Values,
};
4 changes: 1 addition & 3 deletions tests/basic.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
pub mod common;

pub use sea_orm::{
entity::*, error::*, query::*, sea_query, tests_cfg::*, Database, DbConn, PaginatorTrait,
};
pub use sea_orm::{entity::*, error::*, query::*, sea_query, tests_cfg::*, Database, DbConn};

// cargo test --features sqlx-sqlite,runtime-async-std-native-tls --test basic
#[sea_orm_macros::test]
Expand Down
2 changes: 1 addition & 1 deletion tests/crud/updates.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pub use super::*;
use rust_decimal_macros::dec;
use sea_orm::{DbErr, PaginatorTrait};
use sea_orm::{query::*, DbErr};
use uuid::Uuid;

pub async fn test_update_cake(db: &DbConn) {
Expand Down

0 comments on commit 64c54f8

Please sign in to comment.