+
Skip to content

Support up to 6-ary composite primary key #423

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 13, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 25 additions & 1 deletion src/entity/active_model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,31 @@ pub trait ActiveModelTrait: Clone + Debug {
let s3 = next!();
Some(ValueTuple::Three(s1, s2, s3))
}
_ => panic!("The arity cannot be larger than 3"),
4 => {
let s1 = next!();
let s2 = next!();
let s3 = next!();
let s4 = next!();
Some(ValueTuple::Four(s1, s2, s3, s4))
}
5 => {
let s1 = next!();
let s2 = next!();
let s3 = next!();
let s4 = next!();
let s5 = next!();
Some(ValueTuple::Five(s1, s2, s3, s4, s5))
}
6 => {
let s1 = next!();
let s2 = next!();
let s3 = next!();
let s4 = next!();
let s5 = next!();
let s6 = next!();
Some(ValueTuple::Six(s1, s2, s3, s4, s5, s6))
}
_ => panic!("The arity cannot be larger than 6"),
}
}

Expand Down
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载