NewClusterTableSession creates a new TableSession instance for a cluster setup. Parameters: - clusterConfig: The configuration for the cluster session. - enableRPCCompression: A boolean indicating whether RPC compression is enabled. Returns: - An ITableSession instance if the session is successful
(clusterConfig *ClusterConfig, enableRPCCompression bool)
| 104 | // - An ITableSession instance if the session is successfully created. |
| 105 | // - An error if there is an issue during session initialization. |
| 106 | func NewClusterTableSession(clusterConfig *ClusterConfig, enableRPCCompression bool) (ITableSession, error) { |
| 107 | clusterConfig.sqlDialect = TableSqlDialect |
| 108 | session, err := newClusterSessionWithSqlDialect(clusterConfig) |
| 109 | if err != nil { |
| 110 | return nil, err |
| 111 | } |
| 112 | if err = session.OpenCluster(enableRPCCompression); err != nil { |
| 113 | return nil, err |
| 114 | } |
| 115 | return &TableSession{session: session}, nil |
| 116 | } |
| 117 | |
| 118 | // Insert inserts a Tablet into the IoTDB. |
| 119 | // |
searching dependent graphs…