Imports PaginatorTrait
by default making it backward compatible
This commit is contained in:
parent
1905f62430
commit
ac804a1642
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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};
|
||||
|
@ -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?;
|
||||
|
@ -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;
|
||||
|
@ -117,3 +117,6 @@ pub use model::*;
|
||||
// pub use prelude::*;
|
||||
pub use primary_key::*;
|
||||
pub use relation::*;
|
||||
|
||||
// Imports paginator utility by default making it backward compatible.
|
||||
pub use crate::PaginatorTrait;
|
||||
|
@ -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")]
|
||||
|
@ -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 {
|
||||
@ -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 {
|
||||
|
@ -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]
|
||||
|
@ -1,6 +1,6 @@
|
||||
pub use super::*;
|
||||
use rust_decimal_macros::dec;
|
||||
use sea_orm::{DbErr, PaginatorTrait};
|
||||
use sea_orm::DbErr;
|
||||
use uuid::Uuid;
|
||||
|
||||
pub async fn test_update_cake(db: &DbConn) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user