Samuel Marks

Results 339 comments of Samuel Marks

@Wulf Something weird is happening on my latest commit: ```rs if update_struct.has_code() { ret_buffer.push('\n'); ret_buffer.push_str(update_struct.code()); if config.options.default_impl { ret_buffer.push('\n'); ret_buffer.push_str( build_default_impl_fn( &format!("Update{struct_name}"), &update_struct.table.columns, ) .as_str(), ); } ret_buffer.push('\n'); } ```...

Good suggestions. Yeah I still need to add tests, but it should be ready now (aside from that).

@hasezoey Hmm maybe I'm misusing something, `generated_columns = []` always in `generate_for_table` of `src/code.rs`. The rest of the code works well though. ```rs let generated_columns = table_options.get_autogenerated_columns(); println!("generated_columns = {generated_columns:#?}");...

> Code looks mostly OK, but most importantly, tests need to be updated and new tests added for this new option. > > > Hmm maybe I'm misusing something, generated_columns...

@hasezoey Darn… trying to get `Default` for Update to work and it's not working: ## Attempt 0: ```rs build_default_impl_fn( &StructType::format(&StructType::Update, &struct_name), update_struct .table .columns .iter() ``` ## Attempt 1: ```rs...

@Wulf Thanks. Made an edit to handle the Update properly, what do you think now, can we get this merged in? - Then the other PR? Then I've got some...

@hasezoey Can you help this get over the line? Then the other PR? - Then I want to send a new PR to implement `From for UpdateStruct`

I wrote this 2.5 years ago 🤷‍♂️ Your codebase was probably giving me an error and I figured out how to resolve it so sent you a PR

3 weeks has gone by, @ianstenbit did you need me to merge master and redo this?

@ianstenbit Merged in latest master and applied the _defaults to_ changes to more places. It should be ready to go now; merge quick before master deviates!