nrk/redis-lua

is there a way to connect to specific db ?

VVhiteCoder opened this issue · 3 comments

is there a way to connect to specific db ?

I think you can't. You need to connect to a Redis instance and then select the db you want.

nrk commented

@VVhiteCoder just like @ignacio said, you can SELECT a specific database number after the connection to Redis has been established:

local client = redis.connect(host, port)
client:select(database)

Thanks, I know the select, but the question was about db param like in many other clients, but if select is the only way, it's ok :)