TDengine Class |
Namespace: TDengineDriver
public class TDengine
The TDengine type exposes the following members.
Name | Description | |
---|---|---|
AffectRows |
Get the number of rows affected by the executed SQL statement.
| |
Cleanup |
Clean up the running environment and call this API before the application exits.
| |
Close |
Close the connection.
| |
Connect |
Create a database connection and initialize the connection context. The parameters that need to be provided by user.
| |
Consume |
Only synchronous mode, this function is used to get the result of subscription.
If the interval between two calls to taos_consume is less than the polling
cycle of the subscription, the API will block until the interval exceeds this
cycle. If a new record arrives in the database, the API will return the latest
record, otherwise it will return an empty result set with no records.
If the return value is NULL, it indicates a system error.
| |
Equals | (Inherited from Object.) | |
Error |
Public function,calling taos_errstr(IntPtr) inside.Get the reason why the last API call failed, and the return value is a string.
Also see .
| |
ErrorNo |
Get the reason why the last API call failed, and the return value is the error code.
| |
FetchFields | ||
FetchLengths | ||
FetchRowAsync |
Get the result set of asynchronous queries in batch,
which can only be used with QueryAsync().FetchRowAsyncCallback | |
FetchRows |
Get the data in the query result set by rows.
| |
FieldCount |
Get the number of columns in the query result set.
| |
Finalize | (Inherited from Object.) | |
FreeResult |
Release the query result set and related resources.
After the query is completed, be sure to call the API to release resources,
otherwise it may lead to application memory leakage. However,
it should also be noted that after releasing resources,
if you call functions such as Consume(IntPtr) to obtain query results,
it will lead the application to Crash.
| |
GetHashCode | (Inherited from Object.) | |
GetType | (Inherited from Object.) | |
Init |
Initialize the running environment.
If the application does not actively call the API, the API will be automatically called when the application call
Connect(String, String, String, String, Int16), so the application generally does not need to call the API manually.
| |
LoadTableInfo |
user application call this API to load all tables meta,this method call the native
method LoadTableInfoDll.
this method must be called before StmtSetSubTbname(IntPtr stmt, string name);
| |
MemberwiseClone | (Inherited from Object.) | |
Options |
Set client options, currently only time zone setting (_TSDB_OPTIONTIMEZONE)and encoding setting (_TSDB_OPTIONLOCALE) are supported.
The time zone and encoding default to the current operating system settings.
| |
Query |
Public function.
This API is used to execute SQL statements, which can be DQL, DML or DDL statements.
Change the SQL command to UTF-8 to avoid error under Windows.
| |
QueryAsync |
This API uses non-blocking call mode.
Application can open multiple tables and manipulate(query or insert) opened table concurrently.
So applications must ensure that opetations on the same table is completely serialized.
Because that will cause some query and insert operations cannot be performed.
| |
ResultPrecision |
The precision of the timestamp field in the returned result set.
| |
SchemalessInsert |
In addition to writing data using SQL or using the parameter binding API, writing can also be done using Schemaless,
which eliminates the need to create a super table/data sub-table data structure in advance and writes data directly,
while the TDengine system automatically creates and maintains the required table structure based on the written data
content.
| |
StmtAddBatch |
For INSERT only.
add all current bound parameters to batch process. Must be called after each call to
StmtBindParam/StmtBindSingleParamBatch, or all columns binds for one or more lines
with StmtBindSingleParamBatch. User application can call any bind parameter
API again to bind more data lines after calling to this API.
| |
StmtBindParam |
For both INSERT and SELECT.
bind a whole line data.
The usage of structure TAOS_BIND is the same with MYSQL_BIND in MySQL.
| |
StmtBindParamBatch |
for INSERT only
bind one or multiple lines data. The parameter 'bind'
| |
StmtBindSingleParamBatch |
bind a single column's data, INTERNAL used and for INSERT only.
| |
StmtClose |
close STMT object and free resources.
| |
StmtErrorStr |
get detail error message when got failure for any stmt API call. If not failure, the result
returned in this API is unknown.
| |
StmtExecute |
actually execute the INSERT/SELECT sql statement.
User application can continue to bind new data after calling to this API.
| |
StmtInit |
init a TAOS_STMT object for later use.
| |
StmtPrepare |
prepare a sql statement,'sql' should be a valid INSERT/SELECT statement.
| |
StmtSetSubTbname |
For INSERT only.
Set a table name for binding table name as parameter. Only used for binding all tables
in one stable, user application must call 'loadTableInfo' API to load all table
meta before calling this API. If the table meta is not cached locally, it will return error.
| |
StmtSetTbname |
For INSERT only. Used to bind table name as a parmeter for the input stmt object.
| |
StmtSetTbnameTags |
For INSERT only.
set a table name for binding table name as parameter and tag values for all tag parameters.
| |
StmtUseResult |
For SELECT only,getting the query result. User application should free it with API 'FreeResult' at the end.
| |
Subscribe |
This function is used for start subscription service.
| |
ToString | (Inherited from Object.) | |
Unsubscribe |
Unsubscribe.
|
Name | Description | |
---|---|---|
TSDB_CODE_SUCCESS |
The success code return by major of this TDengineDriver's operators.
|