The GET_LINE_NCHAR procedure reads a line of text from a text file in Unicode format.
Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition does not support this feature.
Syntax
UTL_FILE.GET_LINE_NCHAR (
file IN UTL_FILE.FILE_TYPE,
buffer OUT NVARCHAR2,
len IN PLS_INTEGER DEFAULT NULL
);
Parameters
| Parameter | Description |
|---|---|
| file | The file handle for the file to be read. The file must be opened in r mode. |
| buffer | An output parameter used to store the read data. The length of this string must be greater than the value of the len parameter. |
| len | The number of bytes to read. If not specified, the system will use the max_linesize parameter specified when the file was opened. |
Considerations
- Each call reads one line of text, starting from the current file pointer position, until it encounters a line terminator (determined by the operating system, such as \n or \r\n) or reaches the end of the file.
- The line terminator itself is not included in the read content.
- After reading, the file pointer automatically moves to the beginning of the next line.
