Skip to content

Commit d3c56a4

Browse files
committed
Update changelog
1 parent d2df3b6 commit d3c56a4

File tree

1 file changed

+91
-58
lines changed

1 file changed

+91
-58
lines changed

CHANGELOG.md

Lines changed: 91 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -4,44 +4,59 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7-
## [Unreleased]
7+
## [6.3.0] - 2024-10-05
8+
### Changed
9+
- Use `mysqli_stmt::get_result()` instead of `bind_result()` internally
10+
to slightly improve performance and reduce memory usage.
11+
12+
### Deprecated
13+
- Unnecessary getter methods (in `InsertResult`, `BulkInsertResult`, `SqlParams`, and `SqlException`).
14+
815

916
## [6.2.0] - 2022-03-14
1017
### Added
1118
- Support for empty bulk insert queries (previously an error was thrown).
1219

20+
1321
## [6.1.0] - 2021-12-15
1422
### Added
15-
- Shorthand `select` method which takes a `SqlParams` object to allow
23+
- Shorthand `select()` method which takes a `SqlParams` object to allow
1624
bound params in the base select query.
1725
- Support for MySQL exception error handling mode (default in PHP 8.1).
1826

27+
1928
## [6.0.3] - 2021-08-06
2029
### Changed
2130
- Improved type declarations for static analysis.
2231

32+
2333
## [6.0.2] - 2021-02-11
2434
### Changed
2535
- Specified additional types and enabled Psalm static analysis.
2636
- PHP 7.4+ is now required.
2737

38+
2839
## [6.0.1] - 2019-08-05
2940
### Changed
3041
- Implemented missing return type declarations.
3142
- Excluded additional test files from production bundle.
3243

44+
3345
## [6.0.0] Deprecation Elimination - 2019-01-16
3446
### Added
3547
- Scaler and return type declarations.
3648

3749
### Removed
3850
- Support for HHVM as well as PHP versions prior to 7.1.
39-
- Unnecessary `$maximum` parameter from `Selector::offset` method.
51+
- Unnecessary `$maximum` parameter from `Selector::offset()` method.
4052
- All previously-deprecated methods and options.
4153

54+
4255
## [5.5.1] Differentiated Bit - 2017-11-09
4356
### Added
44-
- Support for using `makeBinaryParam` with nullable columns (issue [#5]).
57+
- Support for using `makeBinaryParam()` with nullable columns
58+
(issue [#5](https://github.com/theodorejb/peachy-sql/issues/5)).
59+
4560

4661
## [5.5.0] Null Appreciation - 2017-10-19
4762
### Added
@@ -51,64 +66,71 @@ is not null.
5166
### Deprecated
5267
- Ability to use null values with `eq` and `ne` operators.
5368

69+
5470
## [5.4.0] Boolean Affectation - 2017-03-08
5571
### Added
56-
- `makeBinaryParam` method.
72+
- `makeBinaryParam()` method.
5773

5874
### Fixed
59-
- `Statement::getAffected` method now consistently returns -1 when no
75+
- `Statement::getAffected()` method now consistently returns -1 when no
6076
affected count is available.
6177
- "Incorrect integer value" MySQL error when binding a false value.
6278

79+
6380
## [5.3.1] Deprecation Proclamation - 2017-01-31
6481
### Changed
65-
- Updated readme to document `offset` method instead of deprecated
66-
`paginate` method.
82+
- Updated readme to document `offset()` method instead of deprecated
83+
`paginate()` method.
6784

6885
### Deprecated
69-
- Unnecessary option getter/setter methods (`setTable`, `getTable`,
70-
`setAutoIncrementValue`, `getAutoIncrementValue`, `setIdColumn`,
71-
`getIdColumn`).
86+
- Unnecessary option getter/setter methods (`setTable()`, `getTable()`,
87+
`setAutoIncrementValue()`, `getAutoIncrementValue()`, `setIdColumn()`,
88+
`getIdColumn()`).
89+
7290

7391
## [5.3.0] Descending Increase - 2016-11-04
7492
### Added
75-
- `Selector::offset` method to enable setting an offset that isn't a
93+
- `Selector::offset()` method to enable setting an offset that isn't a
7694
multiple of the page size.
7795

7896
### Deprecated
79-
- `Selector::paginate` method.
97+
- `Selector::paginate()` method.
98+
8099

81100
## [5.2.3] Protracted Refinement - 2016-08-28
82101
### Added
83102
- Support for generating filters with IS NOT NULL and multiple LIKE
84103
operators.
85104

105+
86106
## [5.2.2] Chainable Reparation - 2016-08-25
87107
### Changed
88108
- Updated dependencies and removed unused code.
89109

90110
### Fixed
91111
- Return type of `Selector` functions to support subclass autocompletion.
92112

113+
93114
## [5.2.1] Simple Safety - 2016-07-21
94115
### Changed
95116
- An exception is now thrown when attempting to use pagination without
96117
sorting rows.
97118
- Qualified column identifiers are now automatically escaped. As a
98119
consequence, column names containing periods are no longer supported.
99120

121+
100122
## [5.2.0] Intermediate Injection - 2016-07-07
101123
### Added
102-
- `selectFrom`, `insertRow`, `insertRows`, `updateRows`, and `deleteFrom`
124+
- `selectFrom()`, `insertRow()`, `insertRows()`, `updateRows()`, and `deleteFrom()`
103125
methods which can be passed a table name rather than depending on options
104126
passed to the PeachySQL constructor. This simplifies dependency injection
105127
and also removes the need for implementation-specific options. The new
106-
`selectFrom` method also supports pagination and more complex
107-
sorting/filtering.
128+
`selectFrom()` method also supports pagination and more complex sorting/filtering.
108129

109130
### Deprecated
110-
- Old shorthand methods (`select`, `insertBulk`, `insertOne`, `update`,
111-
and `delete`)
131+
- Old shorthand methods (`select()`, `insertBulk()`, `insertOne()`, `update()`,
132+
and `delete()`)
133+
112134

113135
## [5.1.0] Futuristic Resourcefulness - 2016-04-15
114136
### Changed
@@ -122,10 +144,11 @@ and `delete`)
122144
### Removed
123145
- HHVM generator compatibility hack (no longer necessary as of HHVM v3.11).
124146

147+
125148
## [5.0.0] Escaping Execution - 2015-09-16
126149
### Added
127-
- `prepare` method which binds parameters and returns a `Statement`
128-
object. This object has an `execute` method which makes it possible
150+
- `prepare()` method which binds parameters and returns a `Statement`
151+
object. This object has an `execute()` method which makes it possible
129152
to run the prepared query multiple times with different values.
130153

131154
### Changed
@@ -137,56 +160,62 @@ This object has setters and getters for each setting, which improves
137160
discoverability and refactoring.
138161

139162
### Removed
140-
- `setConnection` and `setOptions` methods. Options can still be
163+
- `setConnection()` and `setOptions()` methods. Options can still be
141164
dynamically changed by calling `getOptions()->setterMethod()`.
142165

143166
### Fixed
144167
- Bug where MySQL insert IDs weren't calculated correctly if the
145168
increment value was altered.
146169

170+
147171
## [4.0.2] Preparatory Fixture - 2015-05-11
148172
### Fixed
149-
- Missing error info for MySQL prepared statement failures (issue [#4]).
173+
- Missing error info for MySQL prepared statement failures
174+
(issue [#4](https://github.com/theodorejb/peachy-sql/issues/4)).
150175

151176
### Removed
152-
- Unnecessary `SqlResult::getQuery` method.
177+
- Unnecessary `SqlResult::getQuery()` method.
178+
153179

154180
## [4.0.1] Stalwart Sparkle - 2015-02-08
155181
### Changed
156182
- Unused code cleanup
157183
- Documentation improvements
158184

185+
159186
## [4.0.0] Economical Alternator - 2015-02-06
160187
### Added
161-
- `SqlResult::getIterator` method which returns a `Generator`, making
188+
- `SqlResult::getIterator()` method which returns a `Generator`, making
162189
it possible to iterate over very large result sets without running into
163190
memory limitations.
164-
- Optional third parameter on `select` method which accepts an array of
191+
- Optional third parameter on `select()` method which accepts an array of
165192
column names to sort by in ascending order.
166-
- `SqlException::getSqlState` method which returns the standard SQLSTATE
193+
- `SqlException::getSqlState()` method which returns the standard SQLSTATE
167194
code for the failure.
168195

169196
### Changed
170-
- `SqlException::getMessage` now includes the SQL error message for the
197+
- `SqlException::getMessage()` now includes the SQL error message for the
171198
failed query.
172-
- `SqlException::getCode` now returns the MySQL or SQL Server error code.
199+
- `SqlException::getCode()` now returns the MySQL or SQL Server error code.
173200

174201
### Removed
175202
- PHP 5.4 support (5.5+ is now required - recent versions of HHVM should
176203
also work if using MySQL).
177-
- Deprecated `insert` and `insertAssoc` methods.
204+
- Deprecated `insert()` and `insertAssoc()` methods.
178205
- Deprecated `TSQL` class.
179-
- Ability to call `SqlResult::getFirst` and `SqlResult::getAll` multiple
206+
- Ability to call `SqlResult::getFirst()` and `SqlResult::getAll()` multiple
180207
times for a given result (since rows are no longer cached in the object).
181208

209+
182210
## [3.0.1] Uniform Optimization - 2014-12-06
183211
### Changed
184212
- Improved documentation consistency
185213
- Minor code cleanup and performance tweaks
186214

215+
187216
## [3.0.0] Hyperactive Lightyear - 2014-12-02
188217
### Added
189-
- `insertOne` and `insertBulk` methods, which accept an associative array
218+
- `insertOne()` and `insertBulk()` methods, which accept an associative array
190219
of columns/values and return `InsertResult` and `BulkInsertResult` objects,
191220
respectively.
192221
- It is now possible to bulk-insert an arbitrarily large set of rows.
@@ -202,33 +231,35 @@ The following classes have been renamed to improve API consistency:
202231
- `SQLResult` is now `SqlResult`
203232
- `MySQLResult` is now `MysqlResult`
204233

205-
Since class and function names in PHP are case insensitive (as are file
234+
Since class and function names in PHP are case-insensitive (as are file
206235
names on some platforms), these renames do not necessarily break
207236
backwards compatibility. However, existing references should still be
208237
updated to avoid confusion.
209238

210239
### Deprecated
211-
- `insertAssoc` method - use `insertOne` instead.
212-
- `insert` method - use `insertBulk` instead.
240+
- `insertAssoc()` method - use `insertOne()` instead.
241+
- `insert()` method - use `insertBulk()` instead.
213242
- `TSQL` class - use `SqlServer` instead.
214243

215244
### Removed
216-
- Previously deprecated `SqlResult::getRows` method.
217-
- Optional callback parameters from `query` and shorthand methods.
245+
- Previously deprecated `SqlResult::getRows()` method.
246+
- Optional callback parameters from `query()` and shorthand methods.
247+
218248

219249
## [2.1.0] Progressive Substitution - 2014-08-03
220250
### Added
221-
- `SQLResult::getFirst` method for retrieving the first selected row.
222-
- `SQLResult::getAll` method for retrieving all selected rows.
251+
- `SQLResult::getFirst()` method for retrieving the first selected row.
252+
- `SQLResult::getAll()` method for retrieving all selected rows.
223253

224254
### Deprecated
225-
- `SQLResult::getRows` is now a deprecated alias of `SQLResult::getAll`.
255+
- `SQLResult::getRows()` is now a deprecated alias of `SQLResult::getAll()`.
256+
226257

227258
## [2.0.0] Peachy Sequel - 2014-07-29
228259
### Added
229-
- `begin`, `commit`, and `rollback` methods to support transactions.
230-
- `insertAssoc` method to easily insert a single row from an associative array.
231-
- `setConnection` method to change the database connection after instantiation.
260+
- `begin()`, `commit()`, and `rollback()` methods to support transactions.
261+
- `insertAssoc()` method to easily insert a single row from an associative array.
262+
- `setConnection()` method to change the database connection after instantiation.
232263
- Option to override the default auto increment value for MySQL.
233264
- Custom `PeachySQL\SQLException` thrown for query errors, with methods
234265
to retrieve the error array, SQL query string, and bound parameters.
@@ -237,35 +268,36 @@ to retrieve the error array, SQL query string, and bound parameters.
237268
### Changed
238269
- The library is now namespaced under `PeachySQL`.
239270
- Callbacks for shorthand methods are now optional. If no callback is
240-
specified, the methods will return sensible defaults (e.g. `select`
241-
returns selected rows, `insert` returns insert IDs, and `update` and
242-
`delete` return the number of affected rows).
271+
specified, the methods will return sensible defaults (e.g. `select()`
272+
returns selected rows, `insert()` returns insert IDs, and `update()` and
273+
`delete()` return the number of affected rows).
243274
- A list of valid columns must now be passed to the options array to
244275
generate queries which reference a column. This allows queries to be
245276
generated from user data without the potential for SQL injection attacks.
246277
- Callbacks are now passed a `SQLResult` object, rather than separate
247278
arguments for selected and affected rows.
248279
- Table name and identity column options are now passed to the
249280
constructor as an associative array.
250-
- If a flat array of values is passed to `insert`, the insert ID will
281+
- If a flat array of values is passed to `insert()`, the insert ID will
251282
now be returned as an integer instead of an array.
252-
- Updated code to follow the PSR-2 [coding style guide](http://www.php-fig.org/psr/psr-2/).
283+
- Updated code to follow the [PSR-2 coding style guide](http://www.php-fig.org/psr/psr-2/).
253284

254285
### Removed
255286
- `$dbType` argument from constructor (use `new PeachySQL\MySQL($conn)`
256287
or `new PeachySQL\TSQL($conn)` instead).
257-
- `getTableName` and `setTableName` methods (replaced with `getOptions`
258-
and `setOptions`).
259-
- `$idCol` parameter from `insert` method (specify via options array
288+
- `getTableName()` and `setTableName()` methods (replaced with `getOptions()`
289+
and `setOptions()`).
290+
- `$idCol` parameter from `insert()` method (specify via options array
260291
instead if using SQL Server).
261-
- `splitRows` method (not core to PeachySQL's goal). The same functionality is
292+
- `splitRows()` method (not core to PeachySQL's goal). The same functionality is
262293
available in the [ArrayUtils library](https://github.com/theodorejb/array-utils).
263294

264295
## Fixed
265296
- Potential error when inserting into a MySQL table without an
266297
auto-incremented column.
267298
- Errors are now thrown if required table/column names aren't specified.
268299

300+
269301
## [1.1.1] - 2014-04-20
270302
### Fixed
271303
- Bug where additional (non-existent) insert IDs were returned when
@@ -274,24 +306,28 @@ inserting a single row into a MySQL table with a flat array.
274306
### Removed
275307
- Unnecessary usage of variable variables.
276308

309+
277310
## [1.1.0] - 2014-04-11
278311
### Changed
279-
- The `query`, `select`, `insert`, `update`, and `delete` methods now
312+
- The `query()`, `select()`, `insert()`, `update()`, and `delete()` methods now
280313
return the value of their callback function, making it easier to use
281314
data outside the callback.
282-
- A flat array of values can now be passed to the `insert` method to
315+
- A flat array of values can now be passed to the `insert()` method to
283316
insert a single row.
284317

318+
285319
## [1.0.1] - 2014-03-28
286320
### Changed
287-
- Simplified `splitRows` example in readme.
321+
- Simplified `splitRows()` example in readme.
288322
- Short array syntax is now used consistently.
289323
- Minor unit test improvements.
290324

325+
291326
## [1.0.0] - 2014-02-20
292327
- Initial release
293328

294-
[Unreleased]: https://github.com/theodorejb/peachy-sql/compare/v6.2.0...HEAD
329+
330+
[6.3.0]: https://github.com/theodorejb/peachy-sql/compare/v6.2.0...v6.3.0
295331
[6.2.0]: https://github.com/theodorejb/peachy-sql/compare/v6.1.0...v6.2.0
296332
[6.1.0]: https://github.com/theodorejb/peachy-sql/compare/v6.0.3...v6.1.0
297333
[6.0.3]: https://github.com/theodorejb/peachy-sql/compare/v6.0.2...v6.0.3
@@ -320,6 +356,3 @@ insert a single row.
320356
[1.1.0]: https://github.com/theodorejb/peachy-sql/compare/v1.0.1...v1.1.0
321357
[1.0.1]: https://github.com/theodorejb/peachy-sql/compare/v1.0.0...v1.0.1
322358
[1.0.0]: https://github.com/theodorejb/peachy-sql/tree/v1.0.0
323-
324-
[#5]: https://github.com/theodorejb/peachy-sql/issues/5
325-
[#4]: https://github.com/theodorejb/peachy-sql/issues/4

0 commit comments

Comments
 (0)