redis-cli --raw
id属性不重复可以作为key
ex:
$ hset 201907020518 "routn" password "vrv123456" _token = "jwt-example"
$ (integer)3
$ hset 213214 title "高等数学" body "考研必备科目" category "教材"
ret-time "2023/11/28" BorrowId "201907020518" Location "图书馆"
total num "15"
$ (integer)7
$ hget user1 name
$ "routn"
$ hget book1 title
$ "高等数学"
$ hset user1 name "lpj"
$ (integer)0
$ hget user1 name
$ "lpj"
使用github开源的hiredis库解析并连接数据库
开源地址: Nomango/configor: A light weight configuration library for C++ (github.com)