Skip to content

Commit 56671d3

Browse files
committed
v0.0.11
1 parent 4ae03e3 commit 56671d3

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Changelog
22

3-
## 0.0.11 - WIP
3+
## 0.0.11 - 2022-11-10
44
- Refactor groupBy to return Table instances to allow for chaining @RoadSigns
55
- Table::transform to allow people to run specific functions on a column @RoadSigns
66
- Update doc

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ Starting from:
145145
```
146146
I would like to **filter** the rows with price greater than 100, **select** only "product" and "price" fields, and for each rows **create a new field** named "new_filed" that is a calculated field (doubling the price):
147147
```php
148+
use HiFolks\DataType\Table;
148149
$dataTable = [
149150
['product' => 'Desk', 'price' => 200, 'active' => true],
150151
['product' => 'Chair', 'price' => 100, 'active' => true],
@@ -155,10 +156,9 @@ $dataTable = [
155156
$table = Table::make($dataTable);
156157
$arr = $table
157158
->select(['product' , 'price'])
158-
->where('price', 100, ">")
159+
->where('price', ">", 100)
159160
->calc('new_field', fn ($item) => $item['price'] * 2)
160161
->arr();
161-
162162
```
163163

164164
The result is

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "hi-folks/array",
33
"version": "0.0.11",
4-
"description": "Arr class for managing arrays, built on top of the PHP array functions.",
4+
"description": "Arr class for managing arrays, and Table class for managing bi-dimensional arrays, built on top of the PHP array functions.",
55
"keywords": [
66
"Hi-Folks",
77
"array"

0 commit comments

Comments
 (0)