Creating Records
Via QuerySetโ
Use the .create() builder pattern:
let post = Post::objects().create()
.set("title", "Hello Ryx")
.set("slug", "hello-ryx")
.set("views", 42i64)
.set("active", true)
.save().await?;
Each .set() call assigns a column value. .save() executes the INSERT and returns the model instance.
Next Stepsโ
- Reading โ Retrieve records