With C# records - which are available since C# 9, so covers Unity requirements as well - we can use subclassing and pattern matching to get sum types that look a lot more like Rust tagged enums.
This is a breaking change but IMO worth it for the better API going forward.
* C#: rename DbEventArgs to ReducerContext
This is no longer an event type, so remove subclassing and rename to match the Rust API.
* Update ReducerContext argument name
* NFC: few more C# shorthand conversions
For some reason these automated refactoring conversions didn't get included in #1149.
* Also remove unused usings
* Restore a using that was erroneously marked as unused
- Fixed column position in sequences (it used index after filtering instead of actual column index).
- Fixed sequence definitions conflicting with automatic sequences derived from Constraints.
- Removed constraints for columns that don't have any.
- Hid internal fields + more minor refactorings.
This is user-facing API that's used in docs & examples, so renaming the internal ColumnAttrs to ColumnDefWithAttrs and ConstraintFlags back to ColumnAttrs so that public examples & existing projects can still compile.
* Refactoring bootstrapping and adding full support for constraints & multi-column indexes
* Removed deleted code and add some comments
* Add comment for Constraints
* Update crates/core/src/db/datastore/locking_tx_datastore/mod.rs
Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Signed-off-by: Mario Montoya <mamcx@elmalabarista.com>
* Update crates/core/src/db/datastore/locking_tx_datastore/mod.rs
Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Signed-off-by: Mario Montoya <mamcx@elmalabarista.com>
* Addressing some PR comments & remove cloning
* Adding details for when fail to decode rows in replay
* Apply Kim's fix for replay bug
* Addressing some PR comments
* Merge
* Fix conflicts
* Fix conflicts
* Fix test
* Fix generation of code for csharp & typescript, now it generate FilterBy for all columns
* Fix for index generation
* Fixing C# index generation
* Merge
* Fix compilation on csharp bindings
---------
Signed-off-by: Mario Montoya <mamcx@elmalabarista.com>
Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: John Detter <no-reply@boppygames.gg>
This allows to make and test ABI-breaking changes much more easily than before.
For now moved them under crates/bindings-csharp - on one hand, it's not a crate, but on another it's the most logical place within our current project structure if we think of `crates` folder as general `projects` folder.