You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: presto-client/README.md
+65Lines changed: 65 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -99,3 +99,68 @@ Additional notes
99
99
- The `query` method is asynchronous and will return a promise that resolves to a PrestoQuery object.
100
100
- The `query` method will automatically retry the query if it fails due to a transient error.
101
101
- The `query` method will cancel the query if the client is destroyed.
102
+
103
+
## Query catalog, schema, table and column metadata
104
+
105
+
### Get Catalogs
106
+
107
+
The `getCatalogs` method retrieves all available database catalogs, returning them as an array of strings.
108
+
109
+
#### Example usage
110
+
111
+
```typescript
112
+
const catalogs =awaitprestoClient.getCatalogs()
113
+
console.log(catalogs)
114
+
```
115
+
116
+
### Get Schemas
117
+
118
+
The `getSchemas` method retrieves all schemas within a given catalog. It accepts a catalog parameter, which is a string representing the name of the catalog.
119
+
120
+
Parameters
121
+
122
+
-`catalog`: The name of the catalog for which to retrieve schemas.
The `getTables` method retrieves a list of tables (of type `Table`) filtered by the given catalog and, optionally, the schema. It accepts an object containing `catalog` and optional `schema` parameters.
The `getColumns` method retrieves a list of columns (of type `Column`) filtered for the given catalog and optional schema and table filters. It accepts an object with `catalog`, and optional `schema` and `table` parameters.
0 commit comments