AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Administrar bases de datos / Big Data / Gestión de bases de datos REDIS
  • Properties specific to redisConnection variables
  • WLanguage functions that use the redisConnection type
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
redisConnection (Variable type)
 
The type redisConnection allows you to define all the advanced characteristics of a connection to a server (or cluster) Redis. You can define and change the characteristics of this connection using different WLanguage properties.
Novedad versión 2025
This type of variable can also be used to define the characteristics of a connection to a Valkey server.
Note: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable.
Ejemplo
// 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"
Propiedades

Properties specific to redisConnection variables

The following properties can be used to manipulate a connection to a Redis server or cluster:
Property nameType usedEffect
ConnectionTimeoutDuration, integerMaximum timeout for the connection expressed in milliseconds (20 seconds by default, i.e. 20000 milliseconds). This property can correspond to:
  • an integer representing the number of milliseconds,
  • a Duration variable,
  • the duration in a readable format (e.g., '20s' or '20000ms').
PasswordCharacter string or Secret stringPassword used if a connection to a Redis server requires authentication.
Novedad versión 2025
Cadenas secretas: Si utiliza el almacén de cadenas secretas, el tipo de cadena secreta utilizado para este parámetro debe ser "ANSI o Unicode string".
Para obtener más información sobre las cadenas secretas y el almacén, consulte Almacén de cadenas secretas.
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 Unix domain socket connection.
Observaciones

WLanguage functions that use the redisConnection type

RedisConnectEstablece una conexión con un servidor o clúster de Redis.
RedisExecuteCommandEjecuta un comando en un servidor de Redis y obtiene el resultado.
RedisPipelineAddAgrega un comando de Redis a una canalización (pipeline).
RedisPipelineGetObtiene el resultado de la ejecución de un comando Redis agregado con la función RedisPipelineAdd.
RedisPipelineResetIgnora los resultados de la ejecución de un comando Redis agregado con la función RedisPipelineAdd.
RedisPublishPublica un mensaje en un canal de Redis.
RedisSubscribeRealiza una suscripción a un canal de Redis.
RedisUnsubscribeCancela una suscripción a un canal de Redis.
Ver también
Versión mínima requerida
  • Versión 24
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 16/05/2025

Señalar un error o enviar una sugerencia | Ayuda local