• redis基础笔记


    Redis数据库支持五种数据类型。

    • 字符串(string)
    • 哈希(hash)
    • 列表(list)
    • 集合(set)
    • 有序集合(sorted set)

        1.字符串:

    127.0.0.1:6379> lpush javatpoint java
    (integer) 1
    127.0.0.1:6379> lpush javatpoint java
    (integer) 2
    127.0.0.1:6379> lpush javatpoint java
    (integer) 3
    127.0.0.1:6379> lpush javatpoint java
    (integer) 4
    127.0.0.1:6379> lrange javatpoint 0 10
    1) "java"
    2) "java"
    3) "java"
    4) "java"
    127.0.0.1:6379>

    127.0.0.1:6379> sadd tutoriallist redis
    (integer) 1
    127.0.0.1:6379> sadd tutoriallist sql
    (integer) 1
    127.0.0.1:6379> sadd tutoriallist postgresql
    (integer) 1
    127.0.0.1:6379> sadd tutoriallist postgresql
    (integer) 0
    127.0.0.1:6379> sadd tutoriallist postgresql
    (integer) 0
    127.0.0.1:6379> smembers tutoriallist
    1) "redis"
    2) "postgresql"
    3) "sql"
    127.0.0.1:6379>

  • 相关阅读:
    AcWing 199. 余数之和
    AcWing 295. 清理班次
    AcWing 294. 计算重复
    Acwing 393. 雇佣收银员
    AcWing 362. 区间
    AcWing 361. 观光奶牛
    CSP-S 2019 Emiya 家今天的饭
    CSP-S 2019游记
    AcWing 345. 牛站 Cow Relays
    java 环境配置
  • 原文地址:https://www.cnblogs.com/Baronboy/p/12235521.html
Copyright © 2020-2023  润新知