1
0
Fork 0
Commit Graph

90 Commits

Author SHA1 Message Date
Jan Steemann a007a867ee "privatized" TRI_vector_t internals.
This allows changing the internals of TRI_vector_t structs in order to make the struct smaller.
On 64 bits, the size of TRI_vector_t is reduced from 48 bytes to 28 bytes.
TRI_json_t does benefit from this, as its biggest component is a TRI_vector_t.
2015-05-05 10:31:02 +02:00
Jan Steemann 6e23c5330f added restrictions for export API 2015-04-17 00:24:43 +02: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 e672d791b5 refactored cursor API, added export API 2015-03-30 18:03:42 +02:00
Jan Steemann 957fa189d2 better diagnostics for arangoimp 2015-01-15 13:42:31 +01:00
Jan Steemann b54dfae96f removed several JSON functions 2015-01-13 01:31:04 +01:00
Jan Steemann 20e7fe7a7a the great rename: array => object, list => array 2014-12-18 21:07:06 +01:00
Jan Steemann dcb9427b6f rewrote transaction contexts 2014-10-16 15:53:28 +02:00
Jan Steemann 8294e54f32 faster import 2014-10-08 17:01:45 +02:00
Jan Steemann 87afcf5e8d the great rename 2014-09-13 00:10:11 +02:00
Jan Steemann 97e36a7eb0 fixed examples 2014-06-24 11:26:51 +02:00
Frank Celler 4dcf5dc817 updated disclaimer 2014-06-20 16:40:35 +02:00
Jan Steemann fabc51f889 fixed wrong ASSERT usage 2014-06-13 12:10:35 +02:00
Max Neunhoeffer c2bddb1c19 Let TRI_document_collection_t inherit from TRI_collection_t. 2014-06-11 10:51:47 +02:00
Jan Steemann da9f8247fb barriers are now created automatically by transactions 2014-06-10 11:56:40 +02:00
Jan Steemann 72a102e794 major internal changes 2014-06-08 00:12:53 +02:00
Jan Steemann 368091d7c3 function cleanup 2014-06-06 21:35:34 +02:00
Max Neunhoeffer fd2c99443f Introduce TRI_doc_mptr_copy_t for copies of master pointers.
Did not yet run through all occurrences of TRI_doc_mptr_t to see
whether they have to be TRI_doc_mptr_copy_t.
2014-06-06 16:59:32 +02:00
Jan Steemann 362838ae69 TRI_ASSERT 2014-06-06 11:25:19 +02:00
Jan Steemann d4dd58b264 merged primary-collection.cpp with document-collection.cpp 2014-05-31 00:22:32 +02:00
Jan Steemann b811d21fad issue #862: added `--overwrite` option for arangoimp 2014-05-16 21:29:20 +02:00
Jan Steemann 42465ce876 properly return collection status 2014-02-26 14:23:06 +01:00
Frank Celler 42fb8244e1 added requeue 2014-02-25 12:07:16 +01:00
Jan Steemann e9c5af7895 Merge branch 'devel' of https://github.com/triAGENS/ArangoDB into sharding
Conflicts:
	CHANGELOG
	js/apps/system/aardvark/frontend/css/collectionsView.css
	js/apps/system/aardvark/frontend/css/layout.css
	js/apps/system/aardvark/frontend/js/routers/router.js
2014-01-30 19:40:21 +01:00
Max Neunhoeffer 3a5a085bc5 Sort out mess with collection name/id lookup in cluster. 2014-01-30 17:27:06 +01:00
Jan Steemann 7f240a1625 fixed segfault in import API 2014-01-27 16:12:39 +01:00
Jan Steemann 12dbcc535d updated import manual 2014-01-21 09:16:42 +01:00
Jan Steemann 4f50b98c45 removed second logger implementation 2013-10-30 00:38:25 +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 106fedd615 several errors fixed 2013-09-26 09:44:50 +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 c22fd49d84 small cleanup 2013-09-11 14:21:54 +02:00
Jan Steemann 3b57e80241 simplified HTTP import API 2013-07-25 18:24:21 +02:00
Jan Steemann ca6b184286 added TRI_JSON_STRING_REFERENCE 2013-07-10 17:00:29 +02:00
Jan Steemann d79d95a3a7 moved attribute names to defines 2013-07-05 14:41:23 +02:00
Jan Steemann 81b94bff94 added missing error handling for importing edges 2013-06-25 16:22:10 +02:00
Jan Steemann c259f8ff4a fixed typo 2013-06-04 10:29:01 +02:00
Jan Steemann d7b64d4ae2 merged patches by @guidoreina 2013-05-21 11:33:43 +02:00
Jan Steemann bfb35a4b3c issue #495 2013-05-03 11:38:10 +02:00
Thomas Richter 62b870e725 in REST-documentation @LIT{} and @FA{} replaced by backticks 2013-04-22 15:42:59 +02:00
Jan Steemann 30b2b2ef3e adjusted locks 2013-04-16 11:23:21 +02:00
Frank Celler f810711a79 FreeBSD port 2013-04-02 18:43:10 +02:00
Frank Celler 1aa5109fa3 updated disclaimer 2013-03-13 17:03:18 +01:00
Jan Steemann a73d32c553 initialise lists to the correct size 2013-03-07 00:46:27 +01:00
Jan Steemann f613c3c4d9 fixed race conditions when reading/deleting documents 2013-03-01 16:44:40 +01:00
Jan Steemann ebc653a0bd issue #435 2013-02-26 12:11:13 +01:00
Jan Steemann 71459b680f issue #426 2013-02-22 23:26:52 +01:00