pub fn create_item_for_list(item: ItemDTO, list_id: i32, conn: &PgConnection) -> bool {
        let item = NewItem {
            list_id,
            description: item.description,
            finished: item.finished,
        };

        diesel::insert_into(dsl::items)
            .values(&item)
            .execute(conn)
            .is_ok()
    }
/// Attempts to insert the given `item` into the items table with reference to the given
/// `list_id`. Returns true if successful and false otherwise.
Attempts to insert the given `item` into the items table with reference to the given
`list_id`. Returns true if successful and false otherwise.
Attempts to insert the given ` item ` into the items table with reference to the given ` list_id ` . Returns true if successful and false otherwise .
pub fn create_item_for_list(item: ItemDTO, list_id: i32, conn: &PgConnection) -> bool {
        let item = NewItem {
            list_id,
            description: item.description,
            finished: item.finished,
        };
        diesel::insert_into(dsl::items)
            .values(&item)
            .execute(conn)
            .is_ok()
    }
pub fn create_item_for_list ( item : ItemDTO , list_id : i32 , conn : & PgConnection ) -> bool { let item = NewItem { list_id , description : item . description , finished : item . finished , } ; diesel :: insert_into ( dsl :: items ) . values ( & item ) . execute ( conn ) . is_ok ( ) }
Attempts to insert the given `item` into the items table with reference to the given
`list_id`.
Attempts to insert the given ` item ` into the items table with reference to the given ` list_id ` .
item
ItemDTO
list_id
i32
conn
&PgConnection
item
ItemDTO
list_id
i32
conn
&PgConnection