mirror of
https://github.com/HDT3213/godis.git
synced 2025-10-05 16:57:06 +08:00
add dbsize command
This commit is contained in:
@@ -74,6 +74,11 @@ func isAuthenticated(c redis.Connection) bool {
|
||||
return c.GetPassword() == config.Properties.RequirePass
|
||||
}
|
||||
|
||||
func DbSize(c redis.Connection, db *Server) redis.Reply {
|
||||
keys, _ := db.GetDBSize(c.GetDBIndex())
|
||||
return protocol.MakeIntReply(int64(keys))
|
||||
}
|
||||
|
||||
func GenGodisInfoString(section string, db *Server) []byte {
|
||||
startUpTimeFromNow := getGodisRuninngTime()
|
||||
switch section {
|
||||
|
Reference in New Issue
Block a user