The GET_TEXT function returns the text data read from the input buffer.
Applicability
This topic applies only to OceanBase Database in Oracle mode.
Syntax
UTL_TCP.GET_TEXT (
c IN OUT NOCOPY connection,
len IN PLS_INTEGER DEFAULT 1,
peek IN BOOLEAN DEFAULT FALSE)
RETURN VARCHAR2;
Parameters
| Parameter | Description |
|---|---|
| c | The TCP/IP connection. |
| len | The number of characters to receive. Default value: 1. |
| peek | If set to true, the data is viewed without being removed from the input queue (requires an input buffer). |
Return value
The text content of the read line.
Considerations
- The connection must have been opened by using the
open_connectionfunction. - Unless explicitly rewritten, the buffer size is in bytes. The parameter
lenspecifies the maximum number of characters to read. Ensure that the buffer size is at least large enough to accommodate one character. Typically, the buffer size should be set to the number of characters to read multiplied by the maximum number of bytes per character. - The message text is converted from the online character set at the time the connection was opened to the database character set and then returned.
- If a transfer timeout was set when the connection was opened, this function will wait for data packets until the timeout occurs, then stop reading and return all successfully read data. If no data was successfully read, the
transfer_timeoutexception is raised.
