|
|
|
@ -38,13 +38,17 @@ public class RedisScriptTableDataModel extends BaseDataModel {
|
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
Redis redis = mc.createRedisClient(); |
|
|
|
|
redis.getClient().select(dbIndex); |
|
|
|
|
RedisClient redisClient = RedisClientSelector.select(redis, engineType); |
|
|
|
|
SimpleDataModel simple = redisClient.build(redis, script, rowCount); |
|
|
|
|
if (simple != null) { |
|
|
|
|
this.columnNames = simple.getColumnNames(); |
|
|
|
|
this.data = simple.getData(); |
|
|
|
|
this.rowCount = simple.getRowCount(); |
|
|
|
|
try { |
|
|
|
|
redis.getClient().select(dbIndex); |
|
|
|
|
RedisClient redisClient = RedisClientSelector.select(redis, engineType); |
|
|
|
|
SimpleDataModel simple = redisClient.build(redis, script, rowCount); |
|
|
|
|
if (simple != null) { |
|
|
|
|
this.columnNames = simple.getColumnNames(); |
|
|
|
|
this.data = simple.getData(); |
|
|
|
|
this.rowCount = simple.getRowCount(); |
|
|
|
|
} |
|
|
|
|
} finally { |
|
|
|
|
redis.close(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|