You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// Specifies the options to the HSETF command when to create hash/fields and the return data
9
+
/// </summary>
10
+
[Flags]
11
+
publicenumHashFieldFlags
12
+
{
13
+
14
+
/// <summary>
15
+
/// No options specified.
16
+
/// </summary>
17
+
None=0,
18
+
/// <summary>
19
+
/// When DC (“Don’t Create”) is specified: if key does not exist: do nothing (don’t create key)
20
+
/// </summary>
21
+
DC=1,
22
+
/// <summary>
23
+
/// When DCF (“Don’t Create Fields”) is specified: for each specified field: if the field already exists: set the field's value and expiration time; ignore fields that do not exist
24
+
/// </summary>
25
+
DCF=2,
26
+
/// <summary>
27
+
/// When DOF (“Don’t Overwrite Fields”) is specified: for each specified field: if such field does not exist: create field and set its value and expiration time; ignore fields that already exists
28
+
/// </summary>
29
+
DOF=4,
30
+
/// <summary>
31
+
/// When GETNEW is specified: returns the new value of given fields
32
+
/// </summary>
33
+
GETNEW=8,
34
+
/// <summary>
35
+
/// When GETOLD is specified: returns the old value of given fields
/// For each specified field, it sets the value and optionally sets the fields expiration
549
+
/// Depending on HashFieldFlags it creates the hash key or its fields in case they dont exist
550
+
/// - When DC is not specified: if key does not exist: create key
551
+
/// - When DC (“Don’t Create”) is specified: if key does not exist: do nothing (don’t create key)
552
+
/// - When neither DCF nor DOF are specified: for each specified field: if such field does not exist: create field; set all fields' value and expiration time
553
+
/// - When DCF (“Don’t Create Fields”) is specified: for each specified field: if the field already exists: set the field's value and expiration time; ignore fields that do not exist
554
+
/// - When DOF (“Don’t Overwrite Fields”) is specified: for each specified field: if such field does not exist: create field and set its value and expiration time; ignore fields that already exists
555
+
/// </summary>
556
+
/// <param name="key">The key of the hash.</param>
557
+
/// <param name="hashFields">The fields in the hash for this operation.</param>
558
+
/// <param name="keepExpiry">Whether to maintain the existing expiration.</param>
559
+
/// <param name="fieldFlags"></param>
560
+
/// <param name="flags">The flags to use for this operation.</param>
561
+
/// <returns>null if the key does not exist. Otherwise returns the result of operation for given fields
562
+
/// return value depends on the HashFieldFlags (GETNEW/GETOLD)
563
+
/// if GETNEW is specified: the value of field after command execution
564
+
/// if GETOLD is specified: the value of field before command execution
565
+
/// if GETNEW or GETOLD is not specified: a + b where
566
+
/// a: 1 if the field's value was set or 0 if not (DCF/DOF met)
567
+
/// b: 2 if the field's expiration time was set/discarded or 0 if not (DCF/DOF met, NX/XX/GT/LT not met)
/// For each specified field, it sets the value and optionally sets the fields expiration
573
+
/// Depending on HashFieldFlags it creates the hash key or its fields in case they dont exist
574
+
/// - When DC is not specified: if key does not exist: create key
575
+
/// - When DC (“Don’t Create”) is specified: if key does not exist: do nothing (don’t create key)
576
+
/// - When neither DCF nor DOF are specified: for each specified field: if such field does not exist: create field; set all fields' value and expiration time
577
+
/// - When DCF (“Don’t Create Fields”) is specified: for each specified field: if the field already exists: set the field's value and expiration time; ignore fields that do not exist
578
+
/// - When DOF (“Don’t Overwrite Fields”) is specified: for each specified field: if such field does not exist: create field and set its value and expiration time; ignore fields that already exists
579
+
/// </summary>
580
+
/// <param name="key">The key of the hash.</param>
581
+
/// <param name="hashFields">The fields in the hash for this operation.</param>
582
+
/// <param name="expireDuration">The time out to set in milliseconds</param>
583
+
/// <param name="when">under which condition the expiration will be set using <see cref="ExpireWhen"/>.</param>
584
+
/// <param name="fieldFlags"></param>
585
+
/// <param name="flags">The flags to use for this operation.</param>
586
+
/// <returns>null if the key does not exist. Otherwise returns the result of operation for given fields
587
+
/// return value depends on the HashFieldFlags (GETNEW/GETOLD)
588
+
/// if GETNEW is specified: the value of field after command execution
589
+
/// if GETOLD is specified: the value of field before command execution
590
+
/// if GETNEW or GETOLD is not specified: a + b where
591
+
/// a: 1 if the field's value was set or 0 if not (DCF/DOF met)
592
+
/// b: 2 if the field's expiration time was set/discarded or 0 if not (DCF/DOF met, NX/XX/GT/LT not met)
/// For each specified field, it sets the value and optionally sets the fields expiration
598
+
/// Depending on HashFieldFlags it creates the hash key or its fields in case they dont exist
599
+
/// - When DC is not specified: if key does not exist: create key
600
+
/// - When DC (“Don’t Create”) is specified: if key does not exist: do nothing (don’t create key)
601
+
/// - When neither DCF nor DOF are specified: for each specified field: if such field does not exist: create field; set all fields' value and expiration time
602
+
/// - When DCF (“Don’t Create Fields”) is specified: for each specified field: if the field already exists: set the field's value and expiration time; ignore fields that do not exist
603
+
/// - When DOF (“Don’t Overwrite Fields”) is specified: for each specified field: if such field does not exist: create field and set its value and expiration time; ignore fields that already exists
604
+
/// </summary>
605
+
/// <param name="key">The key of the hash.</param>
606
+
/// <param name="hashFields">The fields in the hash for this operation.</param>
607
+
/// <param name="expireTime">The exact date to expiry to set.</param>
608
+
/// <param name="when">under which condition the expiration will be set using <see cref="ExpireWhen"/>.</param>
609
+
/// <param name="fieldFlags"></param>
610
+
/// <param name="flags">The flags to use for this operation.</param>
611
+
/// <returns>null if the key does not exist. Otherwise returns the result of operation for given fields
612
+
/// return value depends on the HashFieldFlags (GETNEW/GETOLD)
613
+
/// if GETNEW is specified: the value of field after command execution
614
+
/// if GETOLD is specified: the value of field before command execution
615
+
/// if GETNEW or GETOLD is not specified: a + b where
616
+
/// a: 1 if the field's value was set or 0 if not (DCF/DOF met)
617
+
/// b: 2 if the field's expiration time was set/discarded or 0 if not (DCF/DOF met, NX/XX/GT/LT not met)
0 commit comments