Skip to content

Releases: PhpGt/Database

Consistent collations

06 Feb 13:31
dc7c9cf
Compare
Choose a tag to compare

This minor release ensures that all MySQL connections are made in the same collation as the migrations are made in. This was only ever causing errors when working with variables in queries, and could be overcome in code, but has been fixed for convenience at the point that the connection is made.

Type safe fetching

31 Oct 13:45
2039db4
Compare
Choose a tag to compare

This release introduces the ability to fetch single columns from the database in a type-safe way. If your query only selects one column, you can fetch it using the newly introduced type-safe functions:

  • fetchBool / fetchAllBool
  • fetchString / fetchAllString
  • fetchInt / fetchAllInt
  • fetchFloat / fetchAllFloat
  • fetchDateTime / fetchAllDateTime

Along with the above, the type-safe Row function getDateTime allows the returning of nullable fields, which removes an unintended strict rule introduced in the last release.

Upgrade of dependencies and nullable column returns

21 Aug 21:42
c23b890
Compare
Choose a tag to compare

To keep backwards compatibility, when getting the value of a column from a Row using any of the get* functions, missing columns will now return null for their value.

Row type safety

21 Aug 19:42
c068767
Compare
Choose a tag to compare

The Row object is the most basic object your application will deal with when working with the database. A collection of getter functions has been added to Row in this release, which allow working with type-safe data from the database, without introducing any backwards breaking changes.

The functions are simple, but powerful:

  • getInt
  • getString
  • getFloat
  • getBool
  • getDateTime

They are pretty self-explanatory and available right away.

Have fun and stay productive!

Stable release

08 Feb 12:27
dc702c8
Compare
Choose a tag to compare

The reason this repository has been waiting at v0.8 for quite a while is because the idea of returning Entity objects that extend Rows was being worked on. It would be so useful to perform a fetch and receive the actual object you want to work with, rather than a plain Row object.

However, as explained in #139 , the Repository design pattern can be used to achieve this with very readable code, and without requiring any more changes to this repository itself.

That means that there are no outstanding bugs to fix or features to implement in order to perform a stable release of Database!

Have fun and keep your eye on php.gt/sqlbuilder for database templating coming your way.

January 2019 update

09 Jan 19:13
8f5cf8e
Compare
Choose a tag to compare
January 2019 update Pre-release
Pre-release

More tests are added in this release as the repository gets closer to stable release. As this is getting closer, the minimum-stability composer flag has been removed, meaning it no longer depends on dev releases.

December 2018 update

05 Dec 22:06
04f0831
Compare
Choose a tag to compare
December 2018 update Pre-release
Pre-release

Many small patches and more test coverage.

Main features:

  • Arrays can be used as parameter bindings, automatically concatenated with commas.
  • Countable ResultSet bug fixed.
  • Iterating the ResultSet does not persist the internal pointer position.
  • Refactoring of special bindings code.

v0.8.2: Merge pull request #104 from PhpGt/rename-dsn-to-driver

10 Aug 15:57
5df1717
Compare
Choose a tag to compare
  • WebEngine specific handling of array-like objects (3dfb6a4).
  • toArray implemented on ResultSet and Rows.
  • Configuration is done through PHP.Gt/Config now.
  • Migrations are enhanced - zero configuration does not error.
  • Internal terminology change: "DSN" now referred to as "Driver".

Parameter enhancements

26 May 22:41
5bf813b
Compare
Choose a tag to compare
Pre-release
  • Multiple iterable objects can be passed into the query function as variable arguments, the key-value-pairs will be merged into one parameter binding.
  • Bound parameters are flattened more effectively.
  • SqlQuery/Query class refactoring.

Enhanced migrations

23 May 20:21
698d283
Compare
Choose a tag to compare
Enhanced migrations Pre-release
Pre-release

This feature release contains enhanced migration functionality, along with some small refactorings.

  • More meaningful exceptions thrown when migrations are halted
  • Windows compatibility
  • Test edge cases of different migration file lists
  • Simplify migration order rules
  • Client class is more meaningfully renamed to Database