(connection {:keys [host port]})creates a connection
(def |c| (connection {:host "localhost" :port 4456})) (connection? |c|) => true
(connection:close |c|)
creates a connection
(def |c| (connection {:host "localhost"
:port 4456}))
(connection? |c|)
=> true
(connection:close |c|)(connection-string connection)returns the string
returns the string
(connection:close connection)closes the connection
closes the connection
(connection:health connection)checks on the health of the connection
(connection:health |conn|) => {:status :ok}
checks on the health of the connection
(connection:health |conn|)
=> {:status :ok}(connection:info connection)outputs connection info
outputs connection info
(connection:process-bulk connection inputs outputs _)processes the returned responses
processes the returned responses
(connection:process-single _ data {:keys [format deserialize string]})processes output data
processes output data
(connection:read connection)reads from the connection
reads from the connection
(connection:request-bulk connection commands)(connection:request-bulk connection commands _)sends a multi command to the connection
sends a multi command to the connection
(connection:request-single connection command)(connection:request-single connection command _)requests the connection command
requests the connection command
(connection:started? connection)checks that connection has started
checks that connection has started
(connection:stopped? connection)checks that connection has stopped
checks that connection has stopped
(connection:throw connection t)writes an exception to the connection
writes an exception to the connection
(connection:transact-combine _ data)not valid for rdp protocol
not valid for rdp protocol
(connection:transact-end connection)command to end transaction
(connection:transact-end nil) => ["EXEC"]
command to end transaction (connection:transact-end nil) => ["EXEC"]
(connection:transact-start connection)command to start transaction
(connection:transact-start nil) => ["MULTI"]
command to start transaction (connection:transact-start nil) => ["MULTI"]
(connection:value connection val)writes a string value to the connection
writes a string value to the connection
(connection:write connection input)writes to the connection
writes to the connection
(connection? obj)checks if instance is type connection
(connection? |conn|) => true
checks if instance is type connection (connection? |conn|) => true
(input-array command)protects against wrong inputs
(seq (input-array [1 2 3])) => '("1" "2" "3")
protects against wrong inputs
(seq (input-array [1 2 3]))
=> '("1" "2" "3")(pipeline connection)retrieves the connection pipeline
retrieves the connection pipeline
(pipeline:read pipeline)reads from the pipeline
reads from the pipeline
(pipeline:write pipeline input)sends a request tot the pipeline
sends a request tot the pipeline
(pipeline? obj)checks if object is instance of pipeline
checks if object is instance of pipeline
(test:config)creates a container and gets config
(test:config) => map?
creates a container and gets config (test:config) => map?
(test:connection)(test:connection m)creates a test connection
(test:connection) => connection?
creates a test connection (test:connection) => connection?
(with-connection [conn opts] & body)creates a temporary connection and runs code
(with-connection [conn {:port 17000}] (cc/bulk conn (fn [] (cc/req conn ["FLUSHDB"]) (cc/req conn ["SET" "TEST:A" 1]) (cc/req conn ["KEYS" "*"])) {})) => ["OK" "OK" ["TEST:A"]]
creates a temporary connection and runs code
(with-connection [conn {:port 17000}]
(cc/bulk conn
(fn []
(cc/req conn ["FLUSHDB"])
(cc/req conn ["SET" "TEST:A" 1])
(cc/req conn ["KEYS" "*"]))
{}))
=> ["OK" "OK" ["TEST:A"]](with-test:connection conn & body)creates an runs statements using a test connection
(with-connection [conn {:port 17000}] (cc/bulk conn (fn [] (cc/req conn ["FLUSHDB"]) (cc/req conn ["SET" "TEST:A" 1]) (cc/req conn ["KEYS" "*"])) {})) => ["OK" "OK" ["TEST:A"]]
creates an runs statements using a test connection
(with-connection [conn {:port 17000}]
(cc/bulk conn
(fn []
(cc/req conn ["FLUSHDB"])
(cc/req conn ["SET" "TEST:A" 1])
(cc/req conn ["KEYS" "*"]))
{}))
=> ["OK" "OK" ["TEST:A"]]cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |