Skip to content

Releases: amphp/mysql

0.3.0

12 Dec 17:45
a3c4ba5
Compare
Choose a tag to compare

This release represents a major internal refactor and API refactor for similarity to the amphp/postgres library API. The query method signatures (query, prepare, execute) remain unchanged from the previous version. However most code using this library will likely require some changes based on list of API changes below.

API Changes

  • Pools have been significantly refactored. Pool is now an interface. Connection and Pool share a common Link interface, so most operations can be performed using a single connection or a pool of connections. Operations using a pool automatically return the underlying connection to the pool once the operation has completed.
  • Connections should be made using the Amp\Mysql\connect() function (returns a promise resolved with a Connection object) and connection pools created using the Amp\Mysql\pool() function.
  • Added dedicated transaction API through the Transaction object returned by Link::transaction(). All operations performed on a Transaction object use a single underlying connection.
  • Added Executor interface, implemented by connections, pools, and the Transaction object.
  • Stmt renamed to ConnectionStatement. Statement interface added (use this interface for any type-declarations), implemented by ConnectionStatement.
  • ResultSet has been refactored to implement Amp\Iterator. Queries returning multiple result sets may use ResultSet::nextResultSet() to move the iterator to the next result set.
  • Promises from data modification queries (e.g.: INSERT, UPDATE, DELETE) are now resolved with a CommandResult object.

Further documentation is in progress, for now please have a look through the code doc-blocks for more information.

0.2.3

15 Oct 23:22
Compare
Choose a tag to compare
v0.2.3

The server going away may cause it to send an error packet

0.2.2

25 Sep 09:11
Compare
Choose a tag to compare
v0.2.2

Fixed #40 - unpack not having enough input

0.2.1

21 Sep 16:43
Compare
Choose a tag to compare
v0.2.1

Prepared statement closing must properly reset the sequence ID

0.2.0

17 Aug 11:39
Compare
Choose a tag to compare

Initial Amp v2 release.

0.1.6

08 Jul 06:40
Compare
Choose a tag to compare
v0.1.6

Fixup un/signed mess, add support for decoding SHORT in binary protocol

0.1.5

24 May 20:47
Compare
Choose a tag to compare
Merge pull request #31 from marcioAlmada/master

Fix connection pool recovery

0.1.4

01 Mar 18:17
Compare
Choose a tag to compare
Fix #20 (leave read watcher open watching for close)

Also make tests more flexible (otherwise it tends to break with different mysql versions)

0.1.3

19 Apr 23:09
Compare
Choose a tag to compare
v0.1.3

Allow arrays inside prepares for multiple equally named parameters

0.1.2

11 Apr 18:36
Compare
Choose a tag to compare
v0.1.2

Immediately return after error handling