cargo fmt
This commit is contained in:
parent
8886269616
commit
ec116762a8
@ -42,11 +42,11 @@ pub fn expend_derive_entity(ident: Ident, attrs: Vec<Attribute>) -> syn::Result<
|
|||||||
|
|
||||||
impl EntityTrait for #ident {
|
impl EntityTrait for #ident {
|
||||||
type Model = Model;
|
type Model = Model;
|
||||||
|
|
||||||
type Column = Column;
|
type Column = Column;
|
||||||
|
|
||||||
type PrimaryKey = PrimaryKey;
|
type PrimaryKey = PrimaryKey;
|
||||||
|
|
||||||
type Relation = Relation;
|
type Relation = Relation;
|
||||||
}
|
}
|
||||||
))
|
))
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
use crate::{
|
use crate::{
|
||||||
ColumnTrait, ModelTrait, PrimaryKeyOfModel, PrimaryKeyTrait, QueryHelper, RelationBuilder,
|
ColumnTrait, ModelTrait, PrimaryKeyOfModel, PrimaryKeyTrait, QueryHelper, RelationBuilder,
|
||||||
RelationTrait, RelationType, Select
|
RelationTrait, RelationType, Select,
|
||||||
};
|
};
|
||||||
use sea_query::{Iden, IntoValueTuple};
|
use sea_query::{Iden, IntoValueTuple};
|
||||||
use std::fmt::Debug;
|
use std::fmt::Debug;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
use crate::IdenStatic;
|
||||||
use sea_query::{Iden, IntoIden};
|
use sea_query::{Iden, IntoIden};
|
||||||
use crate::{IdenStatic};
|
|
||||||
use std::rc::Rc;
|
use std::rc::Rc;
|
||||||
|
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
|
@ -220,11 +220,9 @@ fn join_condition(rel: RelationDef) -> SimpleExpr {
|
|||||||
(Identity::Unary(o1), Identity::Unary(f1)) => {
|
(Identity::Unary(o1), Identity::Unary(f1)) => {
|
||||||
Expr::tbl(Rc::clone(&from_tbl), o1).equals(Rc::clone(&to_tbl), f1)
|
Expr::tbl(Rc::clone(&from_tbl), o1).equals(Rc::clone(&to_tbl), f1)
|
||||||
}
|
}
|
||||||
(Identity::Binary(o1, o2), Identity::Binary(f1, f2)) => {
|
(Identity::Binary(o1, o2), Identity::Binary(f1, f2)) => Expr::tbl(Rc::clone(&from_tbl), o1)
|
||||||
Expr::tbl(Rc::clone(&from_tbl), o1).equals(Rc::clone(&to_tbl), f1).and(
|
.equals(Rc::clone(&to_tbl), f1)
|
||||||
Expr::tbl(Rc::clone(&from_tbl), o2).equals(Rc::clone(&to_tbl), f2)
|
.and(Expr::tbl(Rc::clone(&from_tbl), o2).equals(Rc::clone(&to_tbl), f2)),
|
||||||
)
|
|
||||||
}
|
|
||||||
_ => panic!("Owner key and foreign key mismatch"),
|
_ => panic!("Owner key and foreign key mismatch"),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user