Context
Two small value-input conveniences are currently missing.
Borrowed BYTEA values
BYTEA columns accept owned Vec<u8> values but not borrowed slices:
blob.data.eq(bytes.to_vec()); // works
blob.data.eq(bytes.as_slice()); // rejected
Support &[u8] where BYTEA values are currently accepted, including required and nullable columns, inserts, updates, and comparisons. dbkit may copy the slice internally because query binds must own their data.
Nullable active string setters
These currently work:
active.nullable_text.set("text".to_string());
active.nullable_text = "text".into();
active.nullable_text.set_null();
This convenience does not:
active.nullable_text.set("text");
Allow &str in ActiveValue<Option<String>>::set without weakening the generic setter or introducing ambiguity.
Requirements
- Preserve
set(T), set(Option<T>), direct .into() assignment, and set_null() behavior.
- Preserve bare
None inference where it currently works.
- Do not introduce overlapping trait implementations or broader implicit conversions unrelated to these inputs.
- Add focused compile-time coverage for the new and existing forms.
This is a low-priority ergonomics enhancement, not a correctness issue.
Context
Two small value-input conveniences are currently missing.
Borrowed BYTEA values
BYTEA columns accept owned
Vec<u8>values but not borrowed slices:Support
&[u8]where BYTEA values are currently accepted, including required and nullable columns, inserts, updates, and comparisons. dbkit may copy the slice internally because query binds must own their data.Nullable active string setters
These currently work:
This convenience does not:
Allow
&strinActiveValue<Option<String>>::setwithout weakening the generic setter or introducing ambiguity.Requirements
set(T),set(Option<T>), direct.into()assignment, andset_null()behavior.Noneinference where it currently works.This is a low-priority ergonomics enhancement, not a correctness issue.