|
21 | 21 | import com.lancedb.lance.catalog.client.apache.model.CreateNamespaceRequest; |
22 | 22 | import com.lancedb.lance.catalog.client.apache.model.CreateNamespaceResponse; |
23 | 23 | import com.lancedb.lance.catalog.client.apache.model.GetNamespaceResponse; |
| 24 | +import com.lancedb.lance.catalog.client.apache.model.GetTableResult; |
24 | 25 | import com.lancedb.lance.catalog.client.apache.model.ListNamespacesResponse; |
25 | 26 |
|
26 | 27 | import com.fasterxml.jackson.core.type.TypeReference; |
@@ -267,6 +268,88 @@ public GetNamespaceResponse getNamespace(String ns, Map<String, String> addition |
267 | 268 | localVarReturnType); |
268 | 269 | } |
269 | 270 |
|
| 271 | + /** |
| 272 | + * Get a table from the catalog Get a table's detailed properties under a specified namespace |
| 273 | + * from the catalog.\". |
| 274 | + * |
| 275 | + * @param ns The name of the namespace. (required) |
| 276 | + * @param table A table name. (required) |
| 277 | + * @return GetTableResult |
| 278 | + * @throws ApiException if fails to make API call |
| 279 | + */ |
| 280 | + public GetTableResult getTable(String ns, String table) throws ApiException { |
| 281 | + return this.getTable(ns, table, Collections.emptyMap()); |
| 282 | + } |
| 283 | + |
| 284 | + /** |
| 285 | + * Get a table from the catalog Get a table's detailed properties under a specified namespace |
| 286 | + * from the catalog.\". |
| 287 | + * |
| 288 | + * @param ns The name of the namespace. (required) |
| 289 | + * @param table A table name. (required) |
| 290 | + * @param additionalHeaders additionalHeaders for this call |
| 291 | + * @return GetTableResult |
| 292 | + * @throws ApiException if fails to make API call |
| 293 | + */ |
| 294 | + public GetTableResult getTable(String ns, String table, Map<String, String> additionalHeaders) |
| 295 | + throws ApiException { |
| 296 | + Object localVarPostBody = null; |
| 297 | + |
| 298 | + // verify the required parameter 'ns' is set |
| 299 | + if (ns == null) { |
| 300 | + throw new ApiException(400, "Missing the required parameter 'ns' when calling getTable"); |
| 301 | + } |
| 302 | + |
| 303 | + // verify the required parameter 'table' is set |
| 304 | + if (table == null) { |
| 305 | + throw new ApiException(400, "Missing the required parameter 'table' when calling getTable"); |
| 306 | + } |
| 307 | + |
| 308 | + // create path and map variables |
| 309 | + String localVarPath = |
| 310 | + "/v1/namespaces/{ns}/tables/{table}" |
| 311 | + .replaceAll( |
| 312 | + "\\{" + "ns" + "\\}", apiClient.escapeString(apiClient.parameterToString(ns))) |
| 313 | + .replaceAll( |
| 314 | + "\\{" + "table" + "\\}", |
| 315 | + apiClient.escapeString(apiClient.parameterToString(table))); |
| 316 | + |
| 317 | + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); |
| 318 | + String localVarQueryParameterBaseName; |
| 319 | + List<Pair> localVarQueryParams = new ArrayList<Pair>(); |
| 320 | + List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); |
| 321 | + Map<String, String> localVarHeaderParams = new HashMap<String, String>(); |
| 322 | + Map<String, String> localVarCookieParams = new HashMap<String, String>(); |
| 323 | + Map<String, Object> localVarFormParams = new HashMap<String, Object>(); |
| 324 | + |
| 325 | + localVarHeaderParams.putAll(additionalHeaders); |
| 326 | + |
| 327 | + final String[] localVarAccepts = {"application/json"}; |
| 328 | + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); |
| 329 | + |
| 330 | + final String[] localVarContentTypes = {}; |
| 331 | + |
| 332 | + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); |
| 333 | + |
| 334 | + String[] localVarAuthNames = new String[] {}; |
| 335 | + |
| 336 | + TypeReference<GetTableResult> localVarReturnType = new TypeReference<GetTableResult>() {}; |
| 337 | + return apiClient.invokeAPI( |
| 338 | + localVarPath, |
| 339 | + "GET", |
| 340 | + localVarQueryParams, |
| 341 | + localVarCollectionQueryParams, |
| 342 | + localVarQueryStringJoiner.toString(), |
| 343 | + localVarPostBody, |
| 344 | + localVarHeaderParams, |
| 345 | + localVarCookieParams, |
| 346 | + localVarFormParams, |
| 347 | + localVarAccept, |
| 348 | + localVarContentType, |
| 349 | + localVarAuthNames, |
| 350 | + localVarReturnType); |
| 351 | + } |
| 352 | + |
270 | 353 | /** |
271 | 354 | * List all namespaces in the catalog. |
272 | 355 | * |
|
0 commit comments