Releases: josueBarretogit/my_orm
Releases · josueBarretogit/my_orm
v1.3.0
What's Changed
- Release 1.3.0 by @josueBarretogit in #7
find
method now returns &str and the method select_fields
no longer exists
now you can set the name of your table id, here is an example:
#[table_name(books)]
#[id(id_books)] // Set the id of your table, this will be used en the RETURNING and WHERE clauses
pub struct BooksUpdateDto {
pub description: Option<String>,
}
Checkout the README for a detailed example
A new method was introduced find_by_id
, it will be named find_by_{your_table_id}
#[derive(Debug, Default, GetRepository)]
#[table_name(books)]
#[id(id_books)] // Set the id of your table, this will be used in RETURNING and where clauses
pub struct Books {
pub id_books: i64,
pub description: Option<String>,
pub title: Option<String>,
}
you can call: BooksOrm::builder().find_by_id_books()
Now if you forget to use the attributes required by de derive macro you will get a better error message
//compiler error
// proc-macro derive panicked message: #[table_name(your_table_name)] attribute is necessary to indicate which table the methods will affect
#[derive(Debug, Default, GetRepository)]
pub struct BooksUpdateDto {
pub description: Option<String>,
}
Full Changelog: v1.2.1...v1.3.0
v1.2.1
What's Changed
- added suport for bindings other than postgres by @josueBarretogit in #5
- Develop by @josueBarretogit in #6
Full Changelog: v1.1.3...v1.2.1
v1.1.3
v1.1.2
Full Changelog: v1.1.1...v1.1.2
v1.1.1
v1.0.1
What's Changed
- Develop by @josueBarretogit in #1
New Contributors
- @josueBarretogit made their first contribution in #1
Full Changelog: 0.1.3...v1.0.1
0.1.3
Full Changelog: https://github.com/josueBarretogit/my_orm/commits/0.1.3