nrk / redis-lua

A Lua client library for the redis key value storage system.
MIT License
731 stars 239 forks source link

is there a way to connect to specific db ? #37

Closed VVhiteCoder closed 9 years ago

ignacio commented 9 years ago

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

nrk commented 9 years ago

@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)
VVhiteCoder commented 9 years ago

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 :)