Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
KDB Command to Add Array Values #1610
Currently we have to set array keys using the syntax
kdb set user/array kdb set user/array/#0 "first element" kdb set user/array/#1 "second element" kdb ls user/array #> user/array #> user/array/#0 #> user/array/#1
. This works, but if we want to add something at the last place of the array we have to know the last index. It might make sense to add a new command to
kdb add user/array "third element" kdb ls user/array #> user/array #> user/array/#0 #> user/array/#1 #> user/array/#2 kdb add user/newarray "No 1" kdb ls user/newarray #> user/newarray #> user/newarray/#0 kdb get user/newarray/#0 #> No 1
. If we add such an command, then we should probably address issue #182 first.
Thank you for the feature request! I agree it would be very handy. It is already implemented in Ruby (for Puppet integration), but it is missing in the command-line interface.
I think there is no problem in using a higher-level languages or scripts for such convenience commands.
Btw. in doc/todo/TOOLS Line 88 such a tool is already proposed, but your examples are much clearer. I think, however, we should consider to use less generic names ("add" could be anything, see also #265).
Great, then let us rename
Yes, that would be great and also why I suggested