ghdna / athena-express

Athena-Express can simplify executing SQL queries in Amazon Athena AND fetching cleaned-up JSON results in the same synchronous or asynchronous request - well suited for web applications.
https://www.npmjs.com/package/athena-express
MIT License
179 stars 70 forks source link

parameter types of athena express query function don't seem to match documentation #88

Closed mtin79 closed 1 year ago

mtin79 commented 1 year ago

hi there, trying to use your example of a query config object as a parameter in the query function throws typescript errors!

Screenshot 2022-09-14 at 10 37 50

Should i just ignore the typescript errors?

Also the documentation says that pagination format should be a string but examples are with numbers.

Screenshot 2022-09-14 at 10 38 52

Thanks for help!!!

romanlamsal commented 1 year ago

the other advanced query parameters are also missing. Until #89 is merged, you can create an augment.d.ts file in your project and paste the following content

declare module "athena-express" {
    interface QueryObjectInterface {
        db?: string
        pagination?: number
        NextToken?: string
        QueryExecutionId?: string
        catalog?: string
    }
}

export default {}

make sure to include the last line, otherwise you will not augment but override the typings.