Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ All operations in the C++ client are performed through the TableSession class. B
1. `insert(Tablet& tablet, bool sorted = false)`: Inserts a Tablet object containing time series data into the database. The sorted parameter indicates whether the rows in the tablet are already sorted by time.
2. `executeNonQueryStatement(string& sql)`: Executes non-query SQL statements, such as DDL (Data Definition Language) or DML (Data Manipulation Language) commands.
3. `executeQueryStatement(string& sql)`: Executes query SQL statements and returns a SessionDataSet object containing the query results. The optional timeoutInMs parameter indicates the timeout return time.
* Note: When retrieving rows of query results by calling `SessionDataSet::next()`, you must store the returned `std::shared_ptr<RowRecord>` object in a local scope variable (e.g.: `auto row = dataSet->next();`) to ensure the validity of the data lifecycle. If you access it directly via `.get()` or a raw pointer (e.g., `dataSet->next().get()`), the reference count of the smart pointer will drop to zero, the data will be released immediately, and subsequent access will lead to undefined behavior.
4. `open(bool enableRPCCompression = false)`: Opens the connection and determines whether to enable RPC compression (client state must match server state, disabled by default).
5. `close()`: Closes the connection.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ All operations in the C++ client are performed through the TableSession class. B
1. `insert(Tablet& tablet, bool sorted = false)`: Inserts a Tablet object containing time series data into the database. The sorted parameter indicates whether the rows in the tablet are already sorted by time.
2. `executeNonQueryStatement(string& sql)`: Executes non-query SQL statements, such as DDL (Data Definition Language) or DML (Data Manipulation Language) commands.
3. `executeQueryStatement(string& sql)`: Executes query SQL statements and returns a SessionDataSet object containing the query results. The optional timeoutInMs parameter indicates the timeout return time.
* Note: When retrieving rows of query results by calling `SessionDataSet::next()`, you must store the returned `std::shared_ptr<RowRecord>` object in a local scope variable (e.g.: `auto row = dataSet->next();`) to ensure the validity of the data lifecycle. If you access it directly via `.get()` or a raw pointer (e.g., `dataSet->next().get()`), the reference count of the smart pointer will drop to zero, the data will be released immediately, and subsequent access will lead to undefined behavior.
4. `open(bool enableRPCCompression = false)`: Opens the connection and determines whether to enable RPC compression (client state must match server state, disabled by default).
5. `close()`: Closes the connection.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ All operations in the C++ client are performed through the TableSession class. B
1. `insert(Tablet& tablet, bool sorted = false)`: Inserts a Tablet object containing time series data into the database. The sorted parameter indicates whether the rows in the tablet are already sorted by time.
2. `executeNonQueryStatement(string& sql)`: Executes non-query SQL statements, such as DDL (Data Definition Language) or DML (Data Manipulation Language) commands.
3. `executeQueryStatement(string& sql)`: Executes query SQL statements and returns a SessionDataSet object containing the query results. The optional timeoutInMs parameter indicates the timeout return time.
* Note: When retrieving rows of query results by calling `SessionDataSet::next()`, you must store the returned `std::shared_ptr<RowRecord>` object in a local scope variable (e.g.: `auto row = dataSet->next();`) to ensure the validity of the data lifecycle. If you access it directly via `.get()` or a raw pointer (e.g., `dataSet->next().get()`), the reference count of the smart pointer will drop to zero, the data will be released immediately, and subsequent access will lead to undefined behavior.
4. `open(bool enableRPCCompression = false)`: Opens the connection and determines whether to enable RPC compression (client state must match server state, disabled by default).
5. `close()`: Closes the connection.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ All operations in the C++ client are performed through the TableSession class. B
1. `insert(Tablet& tablet, bool sorted = false)`: Inserts a Tablet object containing time series data into the database. The sorted parameter indicates whether the rows in the tablet are already sorted by time.
2. `executeNonQueryStatement(string& sql)`: Executes non-query SQL statements, such as DDL (Data Definition Language) or DML (Data Manipulation Language) commands.
3. `executeQueryStatement(string& sql)`: Executes query SQL statements and returns a SessionDataSet object containing the query results. The optional timeoutInMs parameter indicates the timeout return time.
* Note: When retrieving rows of query results by calling `SessionDataSet::next()`, you must store the returned `std::shared_ptr<RowRecord>` object in a local scope variable (e.g.: `auto row = dataSet->next();`) to ensure the validity of the data lifecycle. If you access it directly via `.get()` or a raw pointer (e.g., `dataSet->next().get()`), the reference count of the smart pointer will drop to zero, the data will be released immediately, and subsequent access will lead to undefined behavior.
4. `open(bool enableRPCCompression = false)`: Opens the connection and determines whether to enable RPC compression (client state must match server state, disabled by default).
5. `close()`: Closes the connection.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ C++ 客户端的操作均通过 TableSession 类进行,下面将给出 TableSe
1. `insert(Tablet& tablet, bool sorted = false)`,将一个包含时间序列数据的Tablet对象插入到数据库中,sorted参数指明tablet中的行是否已按时间排序。
2. `executeNonQueryStatement(string& sql)`,执行非查询SQL语句,如DDL(数据定义语言)或DML(数据操作语言)命令。
3. `executeQueryStatement(string& sql)`,执行查询SQL语句,并返回包含查询结果的SessionDataSet对象,可选timeoutInMs参数指示超时返回时间。
* 注意:调用 `SessionDataSet::next()` 获取查询结果行时,必须将返回的 `std::shared_ptr<RowRecord>` 对象存储在局部作用域变量中(例如:`auto row = dataSet->next();`),以确保数据生命周期有效。若直接通过 `.get()` 或裸指针访问(如 `dataSet->next().get()`),将导致智能指针引用计数归零,数据被立即释放,后续访问将引发未定义行为。
4. `open(bool enableRPCCompression = false)`,开启连接,并决定是否启用RPC压缩(客户端状态须与服务端一致,默认不开启)。
5. `close()`,关闭连接。

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ C++ 客户端的操作均通过 TableSession 类进行,下面将给出 TableSe
1. `insert(Tablet& tablet, bool sorted = false)`,将一个包含时间序列数据的Tablet对象插入到数据库中,sorted参数指明tablet中的行是否已按时间排序。
2. `executeNonQueryStatement(string& sql)`,执行非查询SQL语句,如DDL(数据定义语言)或DML(数据操作语言)命令。
3. `executeQueryStatement(string& sql)`,执行查询SQL语句,并返回包含查询结果的SessionDataSet对象,可选timeoutInMs参数指示超时返回时间。
* 注意:调用 `SessionDataSet::next()` 获取查询结果行时,必须将返回的 `std::shared_ptr<RowRecord>` 对象存储在局部作用域变量中(例如:`auto row = dataSet->next();`),以确保数据生命周期有效。若直接通过 `.get()` 或裸指针访问(如 `dataSet->next().get()`),将导致智能指针引用计数归零,数据被立即释放,后续访问将引发未定义行为。
4. `open(bool enableRPCCompression = false)`,开启连接,并决定是否启用RPC压缩(客户端状态须与服务端一致,默认不开启)。
5. `close()`,关闭连接。

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ C++ 客户端的操作均通过 TableSession 类进行,下面将给出 TableSe
1. `insert(Tablet& tablet, bool sorted = false)`,将一个包含时间序列数据的Tablet对象插入到数据库中,sorted参数指明tablet中的行是否已按时间排序。
2. `executeNonQueryStatement(string& sql)`,执行非查询SQL语句,如DDL(数据定义语言)或DML(数据操作语言)命令。
3. `executeQueryStatement(string& sql)`,执行查询SQL语句,并返回包含查询结果的SessionDataSet对象,可选timeoutInMs参数指示超时返回时间。
* 注意:调用 `SessionDataSet::next()` 获取查询结果行时,必须将返回的 `std::shared_ptr<RowRecord>` 对象存储在局部作用域变量中(例如:`auto row = dataSet->next();`),以确保数据生命周期有效。若直接通过 `.get()` 或裸指针访问(如 `dataSet->next().get()`),将导致智能指针引用计数归零,数据被立即释放,后续访问将引发未定义行为。
4. `open(bool enableRPCCompression = false)`,开启连接,并决定是否启用RPC压缩(客户端状态须与服务端一致,默认不开启)。
5. `close()`,关闭连接。

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ C++ 客户端的操作均通过 TableSession 类进行,下面将给出 TableSe
1. `insert(Tablet& tablet, bool sorted = false)`,将一个包含时间序列数据的Tablet对象插入到数据库中,sorted参数指明tablet中的行是否已按时间排序。
2. `executeNonQueryStatement(string& sql)`,执行非查询SQL语句,如DDL(数据定义语言)或DML(数据操作语言)命令。
3. `executeQueryStatement(string& sql)`,执行查询SQL语句,并返回包含查询结果的SessionDataSet对象,可选timeoutInMs参数指示超时返回时间。
* 注意:调用 `SessionDataSet::next()` 获取查询结果行时,必须将返回的 `std::shared_ptr<RowRecord>` 对象存储在局部作用域变量中(例如:`auto row = dataSet->next();`),以确保数据生命周期有效。若直接通过 `.get()` 或裸指针访问(如 `dataSet->next().get()`),将导致智能指针引用计数归零,数据被立即释放,后续访问将引发未定义行为。
4. `open(bool enableRPCCompression = false)`,开启连接,并决定是否启用RPC压缩(客户端状态须与服务端一致,默认不开启)。
5. `close()`,关闭连接。

Expand Down