public interface SetOperations {
@Nullable
Long add(K key, V... values);
@Nullable
Long remove(K key, Object... values);
@Nullable
V pop(K key);
@Nullable
List pop(K key, long count);
@Nullable
Boolean move(K key, V value, K destKey);
@Nullable
Long size(K key);
@Nullable
Boolean isMember(K key, Object o);
@Nullable
Map isMember(K key, Object... objects);
@Nullable
Set intersect(K key, K otherKey);
@Nullable
Set intersect(K key, Collection otherKeys);
@Nullable
Set intersect(Collection keys);
@Nullable
Long intersectAndStore(K key, K otherKey, K destKey);
@Nullable
Long intersectAndStore(K key, Collection otherKeys, K destKey);
@Nullable
Long intersectAndStore(Collection keys, K destKey);
@Nullable
Set union(K key, K otherKey);
@Nullable
Set union(K key, Collection otherKeys);
@Nullable
Set union(Collection keys);
@Nullable
Long unionAndStore(K key, K otherKey, K destKey);
@Nullable
Long unionAndStore(K key, Collection otherKeys, K destKey);
@Nullable
Long unionAndStore(Collection keys, K destKey);
@Nullable
Set difference(K key, K otherKey);
@Nullable
Set difference(K key, Collection otherKeys);
@Nullable
Set difference(Collection keys);
@Nullable
Long differenceAndStore(K key, K otherKey, K destKey);
@Nullable
Long differenceAndStore(K key, Collection otherKeys, K destKey);
@Nullable
Long differenceAndStore(Collection keys, K destKey);
@Nullable
Set members(K key);
V randomMember(K key);
@Nullable
Set distinctRandomMembers(K key, long count);
@Nullable
List randomMembers(K key, long count);
Cursor scan(K key, ScanOptions options);
RedisOperations getOperations();
}
Description:插入大量测试数据
use xmpl;
drop procedure if exists mockup_test_data_sp;
create procedure mockup_test_data_sp(
in number_of_records int
)
begin
declare cnt int;
declare name varch
MYSQL的随机抽取实现方法。举个例子,要从tablename表中随机提取一条记录,大家一般的写法就是:SELECT * FROM tablename ORDER BY RAND() LIMIT 1。但是,后来我查了一下MYSQL的官方手册,里面针对RAND()的提示大概意思就是,在ORDER BY从句里面不能使用RAND()函数,因为这样会导致数据列被多次扫描。但是在MYSQL 3.23版本中,