Skip to content

Commit

Permalink
moved changelog to CHANGELOG.md
Browse files Browse the repository at this point in the history
added LICENSE
fixed links to tedious docs
  • Loading branch information
ben-page committed Aug 9, 2016
1 parent 76161fd commit 1262540
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 54 deletions.
48 changes: 48 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
### Version 1.0.4
* bug fix only

### Version 1.0.3
* Pool modifies the Tedious connection object rather than the Connection prototype.

### Version 1.0.2
* Added additional log message when acquiring a connection.

### Version 1.0.0
* No changes from v0.3.9.

### Version 0.3.9
* bug fix only

### Version 0.3.7
* bug fix only

### Version 0.3.6
* bug fix only

### Version 0.3.5
* `poolConfig` option `min` is limited to less than `max`

### Version 0.3.4
* `poolConfig` option `min` supports being set to 0

### Version 0.3.3
* Ignore calls to connection.release() on a connection that has been closed or not part of the connection pool.

### Version 0.3.2
* Calls connection.reset() when the connection is released to the pool. This is very unlikely to cause anyone trouble.
* Added a callback argument to connectionPool.drain()

### Version 0.3.0
* Removed dependency on the `generic-pool` node module.
* Added `poolConfig` options `retryDelay`
* Added `poolConfig` options `aquireTimeout` **(Possibly Breaking)**
* Added `poolConfig` options `log`
* `idleTimeoutMillis` renamed to `idleTimeout` **(Possibly Breaking)**
* The `ConnectionPool` `'error'` event added
* The behavior of the err parameter of the callback passed to `acquire()` has changed. It only returns errors related to acquiring a connection not Tedious Connection errors. Connection errors can happen anytime the pool is being filled and could go unnoticed if only passed the the callback. Subscribe to the `'error'` event on the pool to be notified of all connection errors. **(Possibly Breaking)**
* `PooledConnection` object removed.

### Version 0.2.x
* To acquire a connection, call on `acquire()` on a `ConnectionPool` rather than `requestConnection()`. **(Breaking)**
* After acquiring a `PooledConnection`, do not wait for the `'connected'` event. The connection is received connected. **(Breaking)**
* Call `release()` on a `PooledConnection` to release the it back to the pool. `close()` permanently closes the connection (as `close()` behaves in in tedious). **(Breaking)**
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License

Copyright (c) 2016 Mike D Pilsbury

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
57 changes: 3 additions & 54 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,14 @@ pool.drain();
* `log` {Boolean|Function} Set to true to have debug log written to the console or pass a function to receive the log messages. Default = `undefined`

* `connectionConfig` {Object} The same configuration that would be used to [create a
tedious Connection](http://pekim.github.com/tedious/api-connection.html#function_newConnection).
tedious Connection](https://tediousjs.github.io/tedious/api-connection.html#function_newConnection).

### connectionPool.acquire(callback)
Acquire a Tedious Connection object from the pool.

* `callback(err, connection)` {Function} Callback function
* `err` {Object} An Error object is an error occurred trying to acquire a connection, otherwise null.
* `connection` {Object} A [Connection](http://pekim.github.com/tedious/api-connection.html)
* `connection` {Object} A [Connection](https://tediousjs.github.io/tedious/api-connection.html)

### connectionPool.drain(callback)
Close all pooled connections and stop making new ones. The pool should be discarded after it has been drained.
Expand All @@ -104,58 +104,7 @@ Close all pooled connections and stop making new ones. The pool should be discar
The 'error' event is emitted when a connection fails to connect to the SQL Server. The pool will simply retry indefinitely. The application may want to handle errors in a more nuanced way.

## Class: Connection
The following method is added to the Tedious [Connection](http://pekim.github.com/tedious/api-connection.html) object.
The following method is added to the Tedious [Connection](https://tediousjs.github.io/tedious/api-connection.html) object.

### Connection.release()
Release the connect back to the pool to be used again

## Changelog

### Version 1.0.3
* bug fix only

### Version 1.0.3
* Pool modifies the Tedious connection object rather than the Connection prototype.

### Version 1.0.2
* Added additional log message when acquiring a connection.

### Version 1.0.0
* No changes from v0.3.9.

### Version 0.3.9
* bug fix only

### Version 0.3.7
* bug fix only

### Version 0.3.6
* bug fix only

### Version 0.3.5
* `poolConfig` option `min` is limited to less than `max`

### Version 0.3.4
* `poolConfig` option `min` supports being set to 0

### Version 0.3.3
* Ignore calls to connection.release() on a connection that has been closed or not part of the connection pool.

### Version 0.3.2
* Calls connection.reset() when the connection is released to the pool. This is very unlikely to cause anyone trouble.
* Added a callback argument to connectionPool.drain()

### Version 0.3.0
* Removed dependency on the `generic-pool` node module.
* Added `poolConfig` options `retryDelay`
* Added `poolConfig` options `aquireTimeout` **(Possibly Breaking)**
* Added `poolConfig` options `log`
* `idleTimeoutMillis` renamed to `idleTimeout` **(Possibly Breaking)**
* The `ConnectionPool` `'error'` event added
* The behavior of the err parameter of the callback passed to `acquire()` has changed. It only returns errors related to acquiring a connection not Tedious Connection errors. Connection errors can happen anytime the pool is being filled and could go unnoticed if only passed the the callback. Subscribe to the `'error'` event on the pool to be notified of all connection errors. **(Possibly Breaking)**
* `PooledConnection` object removed.

### Version 0.2.x
* To acquire a connection, call on `acquire()` on a `ConnectionPool` rather than `requestConnection()`. **(Breaking)**
* After acquiring a `PooledConnection`, do not wait for the `'connected'` event. The connection is received connected. **(Breaking)**
* Call `release()` on a `PooledConnection` to release the it back to the pool. `close()` permanently closes the connection (as `close()` behaves in in tedious). **(Breaking)**

0 comments on commit 1262540

Please sign in to comment.