added kstore-search
This commit is contained in:
parent
26d6e4613f
commit
0669da315b
@ -33,10 +33,10 @@ function kstore {
|
|||||||
*)
|
*)
|
||||||
__func_head "add [key] [value|file|-] [prop, default: $_KSTORE_DEF_PROP]"
|
__func_head "add [key] [value|file|-] [prop, default: $_KSTORE_DEF_PROP]"
|
||||||
__func_help "update [key] [value|file|-] [prop, default: $_KSTORE_DEF_PROP]"
|
__func_help "update [key] [value|file|-] [prop, default: $_KSTORE_DEF_PROP]"
|
||||||
__func_help "get key [prop, default: $_KSTORE_DEF_PROP]"
|
__func_help "get [key] [prop, default: $_KSTORE_DEF_PROP]"
|
||||||
|
__func_help "del [key]"
|
||||||
__func_help "list"
|
__func_help "list"
|
||||||
__func_help "del key"
|
__func_help "search [key] [prop]"
|
||||||
__func_help "search key"
|
|
||||||
__func_help "secret ..."
|
__func_help "secret ..."
|
||||||
__func_help "query SQL"
|
__func_help "query SQL"
|
||||||
return 1
|
return 1
|
||||||
@ -288,7 +288,12 @@ function kstore-del {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function kstore-search {
|
function kstore-search {
|
||||||
echo "Not implemented yet"
|
local _termk _termp _cond
|
||||||
|
_termk=`kstore-quote "$1"`
|
||||||
|
_termp=`kstore-quote "$2"`
|
||||||
|
_cond="key LIKE '%$_termk%' AND prop LIKE '%$_termp%'"
|
||||||
|
|
||||||
|
$_SQLITE -header -column "$_AUTH_DB" "SELECT key, prop, length( data ) FROM store WHERE $_cond;"
|
||||||
}
|
}
|
||||||
|
|
||||||
function kstore-list {
|
function kstore-list {
|
||||||
|
Loading…
Reference in New Issue
Block a user