Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update CLI User's Manual
  • Loading branch information
Soyoon-Choi committed May 9, 2024
commit d1b9917768bcd6f6d9cc8118482b2aaabb792cc3
22 changes: 15 additions & 7 deletions Manuals/Altibase_7.1/eng/CLI User's Manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,10 @@ This manual is organized as follows:
- Chapter 3: LOB Interface
This chapter describes the functions and data types necessary for using LOB data.

- Chapter 4: Using Cursors

This chapter introduces how to use cursors that the Altibase CLI driver provides.

- Appendix A. Sample Codes
This appendix shows all the sample codes used in this document.

Expand Down Expand Up @@ -6272,13 +6276,13 @@ This chapter describes how CLI processes LOB data, and functions and data types

### How to Process LOB Data

Altibase uses a LOB Locator in the CLI to handle LOB data processing. The LOB Locator is an internal data structure of the Altibase server corresponding to a unique value for LOB data. To perform operations on LOB data, the LOB Locator should be obtained first, which allows users to read from or write to the LOB data. Since the LOB Locator points to LOB data at a specific point in time with respect to MVCC, it is bound to the transaction that generated it and shares its lifecycle.
Altibase uses a **LOB Locator** in the CLI to handle LOB data processing. The LOB Locator is an internal data structure of the Altibase server corresponding to a unique value for LOB data and allows users to read from or write to the LOB data. Therefore, the LOB Locator should be obtained first to process LOB data. Since the LOB Locator points to LOB data at a specific point in time with respect to MVCC, the LOB Locator is bound to the transaction that generated it and shares its lifecycle.

#### Disabling Auto-Commit Mode

Because LOB Locators are transaction-bound, **when using LOB Locators in the CLI to handle LOB data, it is essential to disable auto-commit mode.**

Disabling auto-commit mode allows CLI functions for obtaining LOB Locators and for reading and writing LOB data to operate as individual tasks within a single transaction, enabling sharing of the LOB Locator. Conversely, in auto-commit mode, each CLI function operates within its own individual transaction, preventing sharing of the LOB Locator between two transactions.
Disabling auto-commit mode allows CLI functions for obtaining LOB Locators and for reading and writing LOB data to operate as individual tasks within a single transaction, enabling sharing of the LOB Locator. Conversely, in auto-commit mode, each CLI function operates within its transaction, preventing the sharing of the LOB Locator between two transactions.

> **Considerations When Committing Transactions Using LOB Locators**

Expand Down Expand Up @@ -6320,19 +6324,23 @@ Once LOB data-related operations are complete, the associated resources must be
- [SQLFreeLob](#sqlfreelob)
- [SQLEndTran](#sqlendtran)

> The SQLFreeLob function releases resources related to the LOB Locator without ending the transaction.
> The SQLFreeLob function only releases resources related to the LOB Locator and does not end the transaction.

### LOB data types

#### SQL Data Type

The following table shows SQL data type identifiers that support LOB:

| SQL Type Identifier | Data Type | Description |
| ------------------- | --------- | ----------------------------------------------------- |
| SQL_BLOB | BLOB | BLOB is a binary data type with a variable length. |
| SQL_CLOB | CLOB | CLOB is a character data type with a variable length. |
| SQL Type Identifier | Altibase Data Type | Description |
| ------------------- | ------------------ | ----------------------------------------------------- |
| SQL_BLOB | BLOB | BLOB is a binary data type with a variable length. |
| SQL_CLOB | CLOB | CLOB is a character data type with a variable length. |

[Table 3‑1] Identifier of the SQL data type

#### C Data Type

The following table shows C data type identifiers that support LOB. It lists C data type of ODBC for each identifier and their definition.

Use SQL_C_CHAR for CLOB data and SQL_C_BINARY for BLOB data to bind user variables.
Expand Down
4 changes: 4 additions & 0 deletions Manuals/Altibase_7.1/kor/CLI User's Manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,10 @@ Copyright ⓒ 2001~2023 Altibase Corp. All Rights Reserved.<br>
- 제 3장 LOB 인터페이스
이 장은 LOB 데이터를 사용하는데 필요한 함수 및 데이터 타입을 설명한다.

- 제 4장 커서 사용

이 장은 Altibase CLI 드라이버가 제공하는 커서의 사용법을 설명한다.

- A. 부록: Sample Code
본 매뉴얼에서 전반적으로 사용된 예에 대한 전체 코드 리스트를 나타낸다.

Expand Down