LISTDB

This page documents the preview (v2.21) version. Preview includes features under active development and is for development and testing only. For production, use the stable (v2024.1) version.

Synopsis

LISTDB is used to list all the yedis database(s) available for use. All databases other than the default database ("0") need to be created using the CREATEDB command before use.

A client can issue the LISTDB command through the redis-cli.

Return value

Returns an array of string values, with the yedis database names.

Examples

$ LISTDB
1) "0"
$ CREATEDB "second"
"OK"
$ LISTDB
1) "0"
2) "second"
$ CREATEDB "3.0"
"OK"
$ LISTDB
1) "0"
2) "3.0"
3) "second"
$ DELETEDB "3.0"
"OK"
$ LISTDB
1) "0"
2) "second"

See also

createdb listdb deletedb flushdb flushall select