Replies: 1 comment
-
Using an existing struct would be fairly easy in theory. But it does lead to the question of whether the goal is to save an allocation by reusing a struct, or to update an existing entity. Each use case would want different behavior when there are fields in the struct that are not supplied by the query. But either way, I'm not sure this is a common enough use case to warrant another set of |
Beta Was this translation helpful? Give feedback.
-
The
RowToStructByName
and equivalent functions are generally great for general querying. However, sometimes when submitting a query similar toINSERT ... RETURNING
, you may already have a struct instance that you simply want to update (preserving the original pointer to the struct).It seems like this should be fairly easy to support given that
RowToStructByName
and its sister function all ultimately use a pointer of the value anyway.Beta Was this translation helpful? Give feedback.
All reactions