GET_LINE is used to return the text line data that is read. It continues to read until the end of the line or the end of the input stream is reached.
Applicability
This content applies only to the Oracle-compatible mode of OceanBase Database.
Syntax
UTL_TCP.GET_LINE (
c IN OUT NOCOPY connection,
remove_crlf IN BOOLEAN DEFAULT FALSE,
peek IN BOOLEAN DEFAULT FALSE)
RETURN VARCHAR2;
Parameters
| Parameter | Description |
|---|---|
| c | The TCP/IP connection. |
| remove_crlf | If set to true, any CRLF line breaks at the end of the line are removed. |
| peek | If set to true, the data is inspected but not removed from the input queue (input buffer must exist). |
Return value
The return value is the content of the read text line.
Considerations
- The connection must have been previously opened using
open_connection. - This function only returns when it has read until the end of the line or the end of the input.
- The message text is converted from the online character set specified at the time of opening the connection to the database character set before being returned.
- If a transfer timeout was set when opening the connection, this function will continue waiting to read packets until the timeout occurs. It will stop reading and return all successfully read data. If no data is successfully read, a
transfer_timeoutexception will be raised.