Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

athena-client

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

athena-client - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

4

lib/client.js

@@ -26,2 +26,6 @@ 'use strict'

options = options || {}
if (typeof(options) == 'function') {
callback = options
options = {}
}
let nowConfig = Object.assign({}, config)

@@ -28,0 +32,0 @@ co(function *() {

2

package.json
{
"name": "athena-client",
"version": "0.0.4",
"version": "0.0.5",
"description": "a nodejs simple aws athena client",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/KoteiIto/node-athena",

@@ -62,3 +62,3 @@ athena-client - a nodejs simple aws athena client

### client.execute([_query_], [_options_])
### client.execute([_query_], [_options_], [_callback_])
Returns query result. The _options_ can be specified as an object with `timeout` and `format` members such as the following:

@@ -71,2 +71,25 @@

}
```
```javascript
client.execute('SELECT 1', function(err, data)) {
if (err) {
return console.error(err)
}
console.log(data)
})
client.execute('SELECT 1', {timeout: 3000}, function(err, data)) {
if (err) {
return console.error(err)
}
console.log(data)
})
client.execute('SELECT 1').then(function(data) {
console.log(data)
}).catch(function(err) {
console.error(err)
})
```

@@ -132,2 +132,13 @@ 'use strict'

it('should return success when success to execute query not option (callback)', function(done) {
let mockReqest = getMockRequest()
let client = Client.create(mockReqest, config)
client.execute('query', (err, data) => {
assert.equal(err, null)
assert.equal(data[0].col1, '1')
assert.equal(data[0].col2, '2')
done()
})
})
it('should return error when fail to start query (promise)', function(done) {

@@ -134,0 +145,0 @@ new Promise(resolve => {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc