Skip to content

Commit aea0977

Browse files
committed
Release 0.12.0
## Overview This release offers support of several `*_many()` and `*_object_many()` operations to insert/replace/upsert many tuples at once. Those operations are faster for many tuples/operations of the same kind. Say, if you want to add large amount of data into the cluster, invoke `insert_many()` with 100 (or 1000, depends of the size) tuples per call. ## Breaking changes There are no breaking changes in the release. ## New features * Insert many tuples/objects at once (#193). ```lua crud.insert_many(space_name, tuples, opts) crud.insert_object_many(space_name, objects, opts) ``` * Replace many tuples/objects at once (#193). ```lua crud.replace_many(space_name, tuples, opts) crud.replace_object_many(space_name, objects, opts) ``` * Perform many upsert operations at once (#193). ```lua crud.upsert_many(space_name, tuples_operation_data, opts) crud.upsert_object_many(space_name, objects_operation_data, opts) ``` Example: ```lua crud.replace_many('developers', { {1, box.NULL, 'Elizabeth', 'lizaaa'}, {2, box.NULL, 'Anastasia', 'iamnewdeveloper'}, }) --- - metadata: - {'name': 'id', 'type': 'unsigned'} - {'name': 'bucket_id', 'type': 'unsigned'} - {'name': 'name', 'type': 'string'} - {'name': 'login', 'type': 'string'} rows: - [1, 477, 'Elizabeth', 'lizaaa'] - [2, 401, 'Anastasia', 'iamnewdeveloper'] ... ``` The `*_many()` operations have almost same options as insert/replace/upsert and two new ones to control how errors are interpreted on a storage: * `stop_on_error` (`boolean`, default is `false`) If an error occurs on a storage, stop processing operations of the request on given storage. **Only on the storage, where the error occurs.** * `rollback_on_error` (`boolean`, default is `false`) Rollback all changes on the storage, where an error occurs. **Only on the storage, where the error occurs.** The operations may succeed partially, so data and errors will be returned both. Several errors can occur at a single request: those calls return an array of errors, where each error contains the problematic tuple/object. Consider the README for the detailed description. Be ready to errors that are not recoverable without interaction with a human. This implementation does NOT perform cluster wide transactions or two phare commit: all rollbacks are made only on particular storage.
1 parent 7f84d60 commit aea0977

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

CHANGELOG.md

+9-5
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,20 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
88
## [Unreleased]
99

1010
### Added
11-
* Batch insert/upsert operation
12-
`crud.insert_many()`/`crud.insert_object_many()`/
13-
`crud.upsert_many()`/`crud.upsert_object_many()`
14-
`crud.replace_many()`/`crud.replace_object_many()`
15-
with partial consistency
1611

1712
### Changed
1813

1914
### Fixed
2015

16+
## [0.12.0] - 28-06-22
17+
18+
### Added
19+
* Batch insert/upsert operation
20+
`crud.insert_many()`/`crud.insert_object_many()`/
21+
`crud.upsert_many()`/`crud.upsert_object_many()`
22+
`crud.replace_many()`/`crud.replace_object_many()`
23+
with partial consistency (#193, PR #232).
24+
2125
## [0.11.3] - 15-06-22
2226

2327
### Changed

0 commit comments

Comments
 (0)