File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -146,18 +146,19 @@ export class DuckDBClient {
146
146
}
147
147
148
148
async describeTables ( ) {
149
- const tables = await this . query ( "SHOW TABLES" ) ;
150
- return tables . map ( ( { name} ) => ( { name} ) ) ;
149
+ return Array . from ( await this . query ( "SHOW TABLES" ) , ( { name} ) => ( { name} ) ) ;
151
150
}
152
151
153
152
async describeColumns ( { table} = { } ) {
154
- const columns = await this . query ( `DESCRIBE ${ this . escape ( table ) } ` ) ;
155
- return columns . map ( ( { column_name, column_type, null : nullable } ) => ( {
156
- name : column_name ,
157
- type : getDuckDBType ( column_type ) ,
158
- nullable : nullable !== "NO" ,
159
- databaseType : column_type
160
- } ) ) ;
153
+ return Array . from (
154
+ await this . query ( `DESCRIBE ${ this . escape ( table ) } ` ) ,
155
+ ( { column_name, column_type, null : nullable } ) => ( {
156
+ name : column_name ,
157
+ type : getDuckDBType ( column_type ) ,
158
+ nullable : nullable !== "NO" ,
159
+ databaseType : column_type
160
+ } )
161
+ ) ;
161
162
}
162
163
163
164
static async of ( sources = { } , config = { } ) {
You can’t perform that action at this time.
0 commit comments