You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm having a lot of type issues around building a case statement from dynamic data... trying to build out the following query (MySQL)
UPDATE user
SET json_data = CASE
WHEN email ='[email protected]'
THEN JSON_ARRAY_APPEND(json_data, '$', JSON_OBJECT('some', 'data'))
WHEN email ='[email protected]'
THEN JSON_ARRAY_APPEND(json_data, '$', JSON_OBJECT('some', 'other data'))
END
WHERE email IN ('[email protected]', '[email protected]');
The function generating this receives the update values in the form of a dictionary, like the following...
This data can be variable, so i have to build a case statement dynamically, which results in type errors as mentioned in this comment. However, i have no workaround other than exiting the type system to build a case statement. even without reduce, here's an example...
I'm having a lot of type issues around building a case statement from dynamic data... trying to build out the following query (MySQL)
The function generating this receives the update values in the form of a dictionary, like the following...
This data can be variable, so i have to build a case statement dynamically, which results in type errors as mentioned in this comment. However, i have no workaround other than exiting the type system to build a case statement. even without reduce, here's an example...
Any tips here?
The text was updated successfully, but these errors were encountered: