diff --git a/tutorial-durable/15-map-coord.sh b/tutorial-durable/15-map-coord.sh index a2b55b9..8c48e00 100755 --- a/tutorial-durable/15-map-coord.sh +++ b/tutorial-durable/15-map-coord.sh @@ -9,7 +9,7 @@ # === get === # /m·[1,2] float32:6.28000020980835 # /m·[9,9] (nil) -# === obj vs coord === +# === 命名成员 vs 坐标成员 === # [0] 2 # x 1 # /end @@ -32,8 +32,8 @@ $KV list /m· --kind --showext=false echo "=== get ===" $KV get '/m·[1,2]' '/m·[9,9]' -echo "=== obj vs coord ===" -$KV set /h· 'object:' +echo "=== 命名成员 vs 坐标成员 ===" +$KV set /h· 'map[0]:' # 显式声明容器(memhead),并建 memindex;object kind 已移除 $KV set /h·x 'int:1' $KV set '/h·[0]' 'int:2' $KV list /h· --kind=false --showext=false diff --git a/tutorial-durable/16-geo-coord.sh b/tutorial-durable/16-geo-coord.sh index c57cba3..96a40ac 100644 --- a/tutorial-durable/16-geo-coord.sh +++ b/tutorial-durable/16-geo-coord.sh @@ -14,6 +14,7 @@ KV="$HOME/.local/bin/kvspace" $KV deltree /geo/ echo "=== geo list ===" +$KV set /geo· 'map[0]:' # 先声明容器(memhead),否则成员写被拒 $KV set '/geo·[39.9,116.4]' 'string:Beijing' $KV set '/geo·[31.23,121.47]' 'string:Shanghai' $KV list /geo· --kind --showext=false diff --git a/tutorial-durable/17-cp.sh b/tutorial-durable/17-cp.sh index ec81720..d3f304f 100644 --- a/tutorial-durable/17-cp.sh +++ b/tutorial-durable/17-cp.sh @@ -33,7 +33,7 @@ $KV get /dst/one # cpdir 复制 · 成员容器(base + memindex + 成员) echo "=== cpdir memindex container ===" -$KV set /p· index: +$KV set /p· 'map[0]:' # 容器值(memhead)+ memindex;index: 只建 memindex,成员写会被拒 $KV set /p·x float:3.14 $KV set /p·y int:42 $KV cpdir /p /q