PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Properties specific to the description of redisConnection variables
  • WLanguage functions that use the redisConnection type
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
redisConnection (Type of variable)
In french: redisConnexion
The type redisConnection makes it possible to define all the advanced characteristics of a connection to a Redis server (or cluster). The characteristics of this connection can be defined and modified by several WLanguage properties.
Note: See Declaring a variable for more details on the declaration of this type of variable and the use of WLanguage properties.
Example
// Connection to a server
gRedisSimple is redisConnection
gRedisSimple..Server = "myserveur:7001"
gRedisSimple..ConnectionTimeout = 1s
gRedisSimple..Password = "secret password"
// Connection to a cluster
gRedisCluster is redisConnexion
gRedisCluster..Server[1] = "RedisNode1:7001"
gRedisCluster..Server[2] = "RedisNode1:7002"
gRedisCluster..Server[3] = "RedisNode2:7001"
gRedisCluster..Server[4] = "RedisNode2:7002"
Remarks

Properties specific to the description of redisConnection variables

The following properties can be used to handle a connection to a Redis server or cluster:
Property nameType usedEffect
PasswordCharacter stringPassword used if a the connection to a Redis server requires authentication.
ServerArray of stringsArray of Redis servers.
Ability to specify multiple Redis servers. In the case of a Redis cluster, it will be possible to connect even if a node of the Redis cluster is inaccessible.
The format of the server name must be "ip:port or dnsname:port"
Linux On Linux, it is possible to use the "unix:unixdomainsocket" format to use a connection by unix domain socket.
ConnectionTimeoutDuration, integerMaximum time-out for the connection expressed in milliseconds (20 seconds by default, which means 20000 milliseconds). This property can correspond to:
  • an integer corresponding to the number of milliseconds,
  • a Duration variable,
  • the direct indication of the duration ('20s' or '20000ms' for example).

Note: These properties can be handled by using one of the following syntaxes:
  • <Variable name>..<Property name>
  • <Variable name>.<Property name>

WLanguage functions that use the redisConnection type

Versions 24 and later
RedisConnect
New in version 24
RedisConnect
RedisConnect
Opens a connection to a Redis server (or cluster).
Versions 24 and later
RedisExecuteCommand
New in version 24
RedisExecuteCommand
RedisExecuteCommand
Executes a command on a Redis server and retrieves the result.
Versions 24 and later
RedisPipelineAdd
New in version 24
RedisPipelineAdd
RedisPipelineAdd
Adds a Redis command in a pipeline.
Versions 24 and later
RedisPipelineGet
New in version 24
RedisPipelineGet
RedisPipelineGet
Retrieves the result of the execution of a Redis command that was added by RedisPipelineAdd.
Versions 24 and later
RedisPipelineReset
New in version 24
RedisPipelineReset
RedisPipelineReset
Ignores the results of the execution of a Redis command that was added by RedisPipelineAdd.
Versions 24 and later
RedisPublish
New in version 24
RedisPublish
RedisPublish
Publishes a message on a Redis broadcast channel.
Versions 24 and later
RedisSubscribe
New in version 24
RedisSubscribe
RedisSubscribe
Subscribes to a Redis broadcast channel.
Versions 24 and later
RedisUnsubscribe
New in version 24
RedisUnsubscribe
RedisUnsubscribe
Cancels a subscription to a Redis broadcast channel.
Minimum version required
  • Version 24
This page is also available for…
Comments
Click [Add] to post a comment