Skip to content

Commit 8fb33cb

Browse files
committed
[Doc] README.md update
1 parent ebeead3 commit 8fb33cb

File tree

1 file changed

+23
-6
lines changed

1 file changed

+23
-6
lines changed

README.md

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ OUTLINE
5656
- [`replace()`](#replace)
5757
- [`update()`](#update)
5858
- [`batchUpdate()`](#batchupdate)
59+
- [`batchUpdateMixed()`](#batchupdatemixed)
5960
- [`delete()`](#delete)
6061
- [`getLastInsertID()`](#getlastinsertid)
6162
- [`getAffectedRows()`](#getaffectedrows)
@@ -259,11 +260,11 @@ class Post_model extends My_model
259260

260261
In our pattern, The naming between model class and table is the same, with supporting no matter singular or plural names:
261262

262-
|Model Class Name|Table Name|
263-
|--|--|
264-
|Post_model|post|
265-
|Posts_model|posts|
266-
|User_info_model|user_info|
263+
| Model Class Name | Table Name |
264+
| ---------------- | ---------- |
265+
| Post_model | post |
266+
| Posts_model | posts |
267+
| User_info_model | user_info |
267268

268269
#### Get Table Name
269270

@@ -495,12 +496,28 @@ $result = $this->Model->update(['status'=>'off']);
495496
Update a batch of update queries into combined query strings.
496497

497498
```php
498-
public integer batchUpdate(array $dataSet, boolean $withAll=false, interger $maxLength=4*1024*1024, $runValidation=true)
499+
public integer batchUpdate(array $data, $index, integer $maxSize=100, $runValidation=true)
499500
```
500501

501502
*Example:*
502503
```php
503504
$result = $this->Model->batchUpdate([
505+
['id'=>1, 'title'=>'A1', 'modified'=>'1'],
506+
['id'=>2, 'title'=>'A2', 'modified'=>'1'],
507+
], 'id');
508+
```
509+
510+
#### `batchUpdateMixed()`
511+
512+
Update a batch of update queries into combined query strings.
513+
514+
```php
515+
public integer batchUpdateMixed(array $dataSet, boolean $withAll=false, interger $maxLength=4*1024*1024, $runValidation=true)
516+
```
517+
518+
*Example:*
519+
```php
520+
$result = $this->Model->batchUpdateMixed([
504521
[['title'=>'A1', 'modified'=>'1'], ['id'=>1]],
505522
[['title'=>'A2', 'modified'=>'1'], ['id'=>2]],
506523
]);

0 commit comments

Comments
 (0)