ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / Managing databases / Big Data / Managing REDIS databases
  • Properties specific to redisResponse variables
  • WLanguage functions that use the redisResponse type
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
redisResponse (Variable type)
In french: redisRéponse
The redisResponse type makes it possible to define all the advanced characteristics of a response received by RedisExecuteCommand or RedisPipelineGet. The characteristics of this response can be known using different WLanguage properties.
New in version 2025
This type of variable can also be used to define the characteristics of a Valkey server response.
Note: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable.
Example
INTERNAL PROCEDURE AfficheRésultat(r is redisResponse, sIdent="")
	SWITCH r.Type
		CASE redisTypeInt
			Trace(sIdent + "entier : " + r.Integer)
		CASE redisTypeError
			Trace(sIdent + "erreur : " + r.String)
		CASE redisTypeStatus
			Trace(sIdent + "status : " + r.String)
		CASE redisTypeNil
			Trace(sIdent + "Nil")
		CASE redisTypeArray
			Trace(sIdent + "tableau : ")
			FOR EACH r2 OF r.Array
				AfficheReponse(r2, sIdent + TAB)
			END
		CASE redisTypeBuffer
			Trace(sIdent + "buffer en chaine: " + r.String)
			Trace(sIdent + "buffer en hexa: " + BufferToHexa(r.Buffer))
	END
END

r1 is redisResponse = RedisExecuteCommand(gRedis, "GET cléString")
AfficheRésultat(r1)
Properties

Properties specific to redisResponse variables

The following properties can be used to manipulate a Redis response:
Property nameType usedEffect
ArrayArray of redisResponseIf the Type property is set to the redisTypeArray constant, this property contains an array of redisResponse variables.
BufferBufferBinary value if the Type property is set to the redisTypeBuffer constant.
This property is read-only.
IntegerIntegerInteger value if the Type property is set to the redisTypeInt constant.
This property is read-only.
StringCharacter string
  • If the Type property is set to the redisTypeStatus constant, this property contains the string corresponding to the returned state.
  • If the Type property is set to the redisTypeError constant, this property contains the error message.
  • If the Type property is set to the redisTypeBuffer constant, this property contains the buffer converted to a string using UTF-8 encoding.
This property is read-only.
TypeIntegerType of result. This type can correspond to one of the following constants:
  • redisTypeBuffer The result is a buffer.
  • redisTypeInteger The result is an integer.
  • redisTypeErreur The result corresponds to an error.
  • redisTypeNil Result has no value.
  • redisTypeStatus The result corresponds to a.
  • redisTypeTableau: The result is an array.
This property is read-only.
Remarks

WLanguage functions that use the redisResponse type

RedisExecuteCommandExecutes a command on a Redis server and retrieves the result.
RedisPipelineGetRetrieves the result of the execution of a Redis command that was added by RedisPipelineAdd.
Minimum version required
  • Version 24
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/27/2025

Send a report | Local help