Skip to content

Releases: josueBarretogit/my_orm

v1.3.0

23 May 00:55
Compare
Choose a tag to compare

What's Changed

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

06 May 23:14
3fce9cc
Compare
Choose a tag to compare

What's Changed

Full Changelog: v1.1.3...v1.2.1

v1.1.3

05 May 04:10
951abac
Compare
Choose a tag to compare

What's Changed

Full Changelog: v1.1.2...v1.1.3

v1.1.2

04 May 18:22
Compare
Choose a tag to compare

Full Changelog: v1.1.1...v1.1.2

v1.1.1

04 May 03:25
7cc5cf9
Compare
Choose a tag to compare

What's Changed

Full Changelog: v1.0.1...v1.1.1

v1.0.1

04 May 01:57
e0df05c
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 0.1.3...v1.0.1

0.1.3

01 May 02:36
43e5b40
Compare
Choose a tag to compare
0.1.3 Pre-release
Pre-release