我有一个 userStreamusername,ipaddress,timestamp
我想将此详细信息存储在UserDetailsTable
(内存表中)并需要执行upsert。如果用户名和 ipaddress 相同,我怎么能更新该行,否则作为新行插入。
例如:
Ist userStream is "Rockey","192.15.12.11","10-10-2015 10.32"
2nd userStream is "Jose","192.15.12.21","10-10-2015 10.33"
3rd userStream is "Rockey","192.15.12.11","10-10-2015 10.34"
UserDetailsTable 的结果如下
"Jose","192.15.12.21","10-10-2015 10.33" (New row)
"Rockey","192.15.12.11","10-10-2015 10.34" (Update the existing row)