1
0
Fork 0
Commit Graph

46 Commits

Author SHA1 Message Date
Jan Steemann bbfaee3bfe allow specifying collection name prefixes for `_from` and `_to` in arangoimp: 2016-04-15 16:18:23 +02:00
Frank Celler 486011d399 Merge branch 'devel' of github.com:arangodb/arangodb into spdvpk 2016-03-31 13:41:09 +02:00
Frank Celler 494bdca847 splitted HttpRequest into GeneralRequest/HttpRequest 2016-03-31 11:45:21 +02:00
Michael Hackstein 25b33b9048 Fixed invalid forward declarations 2016-03-18 15:52:49 +01:00
Max Neunhoeffer e77159b008 New returnNew option for insert. 2016-03-11 12:44:36 +01:00
Jan Steemann 6eea757c01 simplifications 2016-03-04 19:40:24 +01:00
Jan Steemann ad4a9542ea removed file 2016-03-04 18:32:54 +01:00
Jan Steemann 0a969caf23 removed SingleCollectionReadOnlyTransaction and SingleCollectionWriteTransaction 2016-02-23 11:05:44 +01:00
Michael Hackstein 2b10ec64d3 Adapted RestImportHandler to new Transaction API 2016-02-17 13:49:10 +01:00
Jan Steemann 9046e1831b clang-format 2016-01-27 13:43:46 +01:00
jsteemann 842384016d namespace cleanup 2016-01-21 00:20:22 +01:00
jsteemann 431900f17a changed namespace from triagens to arangodb 2016-01-17 00:44:53 +01:00
jsteemann 1b959c827d more const unification 2016-01-15 00:09:52 +01:00
Jan Steemann 687d6133f0 comments reformatting 2016-01-11 09:52:39 +01:00
jsteemann 50c0e18d53 removed useless con|destructor comments 2016-01-07 21:19:53 +01:00
Jan Steemann 3ad20c0cae auto-generated headers 2016-01-06 18:41:51 +01:00
Jan Steemann a3b026d9d1 removed useless sections from code, unified include guards 2016-01-06 14:15:22 +01:00
Jan Steemann f422576ee0 clang-format 2016-01-05 17:43:24 +01:00
jsteemann 19782a45a6 Merge branch 'devel' of https://github.com/arangodb/arangodb into vpack 2015-12-18 23:33:44 +01:00
jsteemann 20ed092d11 added `--create-collection-type` option for arangoimp 2015-12-18 22:26:32 +01:00
Michael Hackstein 13a8f6871f Fixes in RestImport handler. It failed in some malformed input formats 2015-12-06 01:04:38 +01:00
Michael Hackstein e32b2e2d6f Largely removed references to TRI_json_t in RestImportHandler. Only needs temporary TRI_json_t's to interact with transactions 2015-12-05 13:01:55 +01:00
Jan Steemann eb8899d9ae applied changes suggested by cppcheck 2015-12-02 10:17:14 +01:00
Jan Steemann 92fcdd3e56 issue #1298: Bulk import if data already exists
This change extends the HTTP REST API for bulk imports as follows:

When documents are imported and the `_key` attribute is specified for them, the import can be
used for inserting and updating/replacing documents. Previously, the import could be used for
inserting new documents only, and re-inserting a document with an existing would have failed
with a *unique key constraint violated* error.

The above behavior is still the default. However, the API now allows controlling the behavior
in case of a unique key constraint error via the optional URL parameter `onDuplicate`.

This parameter can have one of the following values:

- `error`: when a unique key constraint error occurs, do not import or update the document but
  report an error. This is the default.

- `update`: when a unique key constraint error occurs, try to (partially) update the existing
  document with the data specified in the import. This may still fail if the document would
  violate secondary unique indexes. Only the attributes present in the import data will be
  updated and other attributes already present will be preserved. The number of updated documents
  will be reported in the `updated` attribute of the HTTP API result.

- `replace`: when a unique key constraint error occurs, try to fully replace the existing
  document with the data specified in the import. This may still fail if the document would
  violate secondary unique indexes. The number of replaced documents will be reported in the
  `updated` attribute of the HTTP API result.

- `ignore`: when a unique key constraint error occurs, ignore this error. There will be no
  insert, update or replace for the particular document. Ignored documents will be reported
  separately in the `ignored` attribute of the HTTP API result.

The result of the HTTP import API will now contain the attributes `ignored` and `updated`, which
contain the number of ignored and updated documents respectively. These attributes will contain a
value of zero unless the `onDuplicate` URL parameter is set to either `update` or `replace`
(in this case the `updated` attribute may contain non-zero values) or `ignore` (in this case the
`ignored` attribute may contain a non-zero value).
2015-04-14 11:44:33 +02:00
Jan Steemann 2299d2916d initial commit to satisfy #1298 2015-04-13 18:26:33 +02:00
Jan Steemann 957fa189d2 better diagnostics for arangoimp 2015-01-15 13:42:31 +01:00
Jan Steemann 223820eba3 removed some macros 2014-10-16 16:31:49 +02:00
Jan Steemann 8294e54f32 faster import 2014-10-08 17:01:45 +02:00
Frank Celler 4dcf5dc817 updated disclaimer 2014-06-20 16:40:35 +02:00
Jan Steemann 72a102e794 major internal changes 2014-06-08 00:12:53 +02:00
Max Neunhoeffer e7560357d2 Further cleanup with #include "Basics/Common.h" 2014-05-21 16:59:54 +02:00
Jan Steemann b811d21fad issue #862: added `--overwrite` option for arangoimp 2014-05-16 21:29:20 +02:00
Frank Celler 42fb8244e1 added requeue 2014-02-25 12:07:16 +01:00
Jan Steemann 63f6cb91f4 added `details` URL parameter for `/_api/import` 2013-10-08 01:34:16 +02:00
Jan Steemann d6149c9a9a added documentation for /_api/import 2013-10-02 14:22:25 +02:00
Jan Steemann ed163164c4 fixed queue naming 2013-09-20 13:17:32 +02:00
Jan Steemann 3a6cabfe44 creating/dropping 2013-09-11 17:16:43 +02:00
Jan Steemann 3b57e80241 simplified HTTP import API 2013-07-25 18:24:21 +02:00
Jan Steemann d7b64d4ae2 merged patches by @guidoreina 2013-05-21 11:33:43 +02:00
Frank Celler 1aa5109fa3 updated disclaimer 2013-03-13 17:03:18 +01:00
Jan Steemann ebc653a0bd issue #435 2013-02-26 12:11:13 +01:00
Jan Steemann 7254487e14 added --progress option for arangoimp. make arangod show import errors 2013-01-22 15:04:06 +01:00
Jan Steemann 8c7ca55512 issue #300 2012-12-01 03:15:39 +01:00
Jan Steemann 72d2798368 improved error message for imports 2012-08-31 13:29:51 +02:00
Jan Steemann 384384932e issue #59: added tests for /_api/import 2012-08-15 10:31:25 +02:00
Frank Celler d2c758d663 the great rename 2012-06-08 15:01:25 +02:00