File: HASH.md

package info (click to toggle)
python-fakeredis 2.29.0-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,772 kB
  • sloc: python: 19,002; sh: 8; makefile: 5
file content (115 lines) | stat: -rw-r--r-- 3,303 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# Redis `hash` commands (25/27 implemented)

## [HDEL](https://redis.io/commands/hdel/)

Deletes one or more fields and their values from a hash. Deletes the hash if no fields remain.

## [HEXISTS](https://redis.io/commands/hexists/)

Determines whether a field exists in a hash.

## [HEXPIRE](https://redis.io/commands/hexpire/)

Set expiry for hash field using relative time to expire (seconds)

## [HEXPIREAT](https://redis.io/commands/hexpireat/)

Set expiry for hash field using an absolute Unix timestamp (seconds)

## [HEXPIRETIME](https://redis.io/commands/hexpiretime/)

Returns the expiration time of a hash field as a Unix timestamp, in seconds.

## [HGET](https://redis.io/commands/hget/)

Returns the value of a field in a hash.

## [HGETALL](https://redis.io/commands/hgetall/)

Returns all fields and values in a hash.

## [HINCRBY](https://redis.io/commands/hincrby/)

Increments the integer value of a field in a hash by a number. Uses 0 as initial value if the field doesn't exist.

## [HINCRBYFLOAT](https://redis.io/commands/hincrbyfloat/)

Increments the floating point value of a field by a number. Uses 0 as initial value if the field doesn't exist.

## [HKEYS](https://redis.io/commands/hkeys/)

Returns all fields in a hash.

## [HLEN](https://redis.io/commands/hlen/)

Returns the number of fields in a hash.

## [HMGET](https://redis.io/commands/hmget/)

Returns the values of all fields in a hash.

## [HMSET](https://redis.io/commands/hmset/)

Sets the values of multiple fields.

## [HPERSIST](https://redis.io/commands/hpersist/)

Removes the expiration time for each specified field

## [HPEXPIRE](https://redis.io/commands/hpexpire/)

Set expiry for hash field using relative time to expire (milliseconds)

## [HPEXPIREAT](https://redis.io/commands/hpexpireat/)

Set expiry for hash field using an absolute Unix timestamp (milliseconds)

## [HPEXPIRETIME](https://redis.io/commands/hpexpiretime/)

Returns the expiration time of a hash field as a Unix timestamp, in msec.

## [HPTTL](https://redis.io/commands/hpttl/)

Returns the TTL in milliseconds of a hash field.

## [HRANDFIELD](https://redis.io/commands/hrandfield/)

Returns one or more random fields from a hash.

## [HSCAN](https://redis.io/commands/hscan/)

Iterates over fields and values of a hash.

## [HSET](https://redis.io/commands/hset/)

Creates or modifies the value of a field in a hash.

## [HSETNX](https://redis.io/commands/hsetnx/)

Sets the value of a field in a hash only when the field doesn't exist.

## [HSTRLEN](https://redis.io/commands/hstrlen/)

Returns the length of the value of a field.

## [HTTL](https://redis.io/commands/httl/)

Returns the TTL in seconds of a hash field.

## [HVALS](https://redis.io/commands/hvals/)

Returns all values in a hash.


## Unsupported hash commands 
> To implement support for a command, see [here](/guides/implement-command/) 

#### [HGETF](https://redis.io/commands/hgetf/) <small>(not implemented)</small>

For each specified field, returns its value and optionally set the field's remaining expiration time in seconds / milliseconds

#### [HSETF](https://redis.io/commands/hsetf/) <small>(not implemented)</small>

For each specified field, returns its value and optionally set the field's remaining expiration time in seconds / milliseconds