---
# System prepended metadata

title: code review 20200429

---

# code review 20200429
Laravel needs to Learning

- [ ] policy
- [ ] service provider
- [ ] life cycle
- [ ] php artisan
- [ ] restiful api
- [ ] closure
- [ ] kernel
- [ ] collection
- [ ] subquery
- [ ] php asnyc
- [ ] prefix group
- [ ] Model binging
- [ ] artisan command

## Validation
- [ ] middlewire
- [ ] csrf, cors


- [ ] access token
- [ ] remeber token
- [ ] JWT token
- [ ] SSH key
- [ ] SCP

## DB
- [ ] seed, factory
- [ ] query builder vs eloquent builder

# flow
- [ ] Quene 隊列
- [ ] crontab


看到一個有趣的題目, 有興趣的可以說說自己的答案 XD
以下為圖 1 跟 圖 2, table schema 為 id, a 就這兩個 column
資料庫為 MySQL
問題是
圖 1 的 session A 結尾的 select * from t where id = 1 的結果是？
同上, 圖 2 的結果是？


| Column | id | a |
| -------- | -------- | -------- |
| Text     | 1     | 2 -> 3  |

![圖一](https://i.imgur.com/d889frq.png)
A:(1,3)->session A

![圖二](https://i.imgur.com/urf5am0.png)
A:(1,2)->session B

transaction->mysql default 鎖raw
mysql session