Closed Kilerd closed 1 month ago
and BTW I dont use tonbo in any of my projects, if you guys can provide some testcases are very helpful.
and BTW I dont use tonbo in any of my projects, if you guys can provide some testcases are very helpful.
This is a very big and meaningful PR, I will continue to follow up on the testing work
yep, you're right, and I recommend to review this PR commit by commit.
@Kilerd @ethe at present, macros does not support many configurable functions. Its core is to help users reduce code, so I only add tests to macro to verify the correctness. please take a look
https://github.com/tonbo-io/tonbo/pull/141/commits/7f7cb395ac4b6c2b0e5a85c4aedce45a42dee07c
This is pretty neat! Thanks to @Kilerd
this PR is to impl issue #58
main change:
#[tonbo_record]
macro, use#[derive(Record)]
instead#[primary_key]
attribute, use#[record(primary_key)]
#[tonbo_record(::serde::Serialize)]
logic, use#[derive(Record, ::serde::Serialize)]
instead::tonbo::KeyAttributes, Debug, PartialEq, Eq, Clone
refactor related:
further optimization:
UserRef
for structUser
, which may cause code conflict if use had defined one in his codebase. the common pattern is to add unique prefix for generated struct , E.G.__TonboUserRef
Debug
as required trait for traitRecord
, cuz it will slow down the compile time. and have no idea why we need this trait.