Skip to content

Commit c97bc84

Browse files
committed
added missing docs
1 parent 7cdd2a5 commit c97bc84

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

cot/src/db/migrations.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1558,10 +1558,13 @@ impl RemoveModelBuilder {
15581558
}
15591559
}
15601560

1561+
/// Returns a builder for an operation that alters a field in a model.
15611562
pub const fn alter_field() -> AlterFieldBuilder {
15621563
AlterFieldBuilder::new()
15631564
}
15641565

1566+
/// A builder for altering a field in a model.
1567+
#[must_use]
15651568
#[derive(Debug, Copy, Clone)]
15661569
pub struct AlterFieldBuilder {
15671570
table_name: Option<Identifier>,
@@ -1578,21 +1581,26 @@ impl AlterFieldBuilder {
15781581
}
15791582
}
15801583

1584+
/// Sets the name of the table to alter the field in.
15811585
pub const fn table_name(mut self, table_name: Identifier) -> Self {
15821586
self.table_name = Some(table_name);
15831587
self
15841588
}
15851589

1590+
/// Sets the old field definition.
15861591
pub const fn old_field(mut self, field: Field) -> Self {
15871592
self.old_field = Some(field);
15881593
self
15891594
}
15901595

1596+
/// Sets the new field definition.
15911597
pub const fn new_field(mut self, field: Field) -> Self {
15921598
self.new_field = Some(field);
15931599
self
15941600
}
15951601

1602+
/// Builds the operation.
1603+
#[must_use]
15961604
pub const fn build(self) -> Operation {
15971605
Operation::new(OperationInner::AlterField {
15981606
table_name: unwrap_builder_option!(self, table_name),

0 commit comments

Comments
 (0)