This commit is contained in:
Billy Chan 2022-12-16 16:48:16 +08:00
parent 596afd2081
commit ccca35ab1a
No known key found for this signature in database
GPG Key ID: A2D690CAC7DF3CC7
3 changed files with 6 additions and 6 deletions

View File

@ -202,8 +202,8 @@ impl EntityTransformer {
}
Ok(EntityWriter {
entities: entities
.into_iter()
.map(|(_, mut v)| {
.into_values()
.map(|mut v| {
v.relations.sort_by(|a, b| a.ref_table.cmp(&b.ref_table));
v
})

View File

@ -225,8 +225,8 @@ impl EntityWriter {
lines.push("".to_owned());
let code_blocks = self
.enums
.iter()
.map(|(_, active_enum)| active_enum.impl_active_enum(with_serde, with_copy_enums))
.values()
.map(|active_enum| active_enum.impl_active_enum(with_serde, with_copy_enums))
.collect();
Self::write(&mut lines, code_blocks);
OutputFile {

View File

@ -45,8 +45,8 @@ where
let query = self
.query
.clone()
.limit(self.page_size as u64)
.offset((self.page_size * page) as u64)
.limit(self.page_size)
.offset(self.page_size * page)
.to_owned();
let builder = self.db.get_database_backend();
let stmt = builder.build(&query);