1
0
Fork 0
Commit Graph

8 Commits

Author SHA1 Message Date
Jan Steemann c843a12149 jshund 2014-05-09 00:42:18 +02:00
Jan Steemann fe74e030ea fixed keygen test 2014-02-26 16:47:38 +01:00
Max Neunhoeffer 16a2fa6770 Split noncluster and general shell-keygen tests. 2014-02-26 14:27:55 +01:00
Jan Steemann 106fedd615 several errors fixed 2013-09-26 09:44:50 +02:00
Jan Steemann 5631314bc7 issue #212: added auto-increment support for collections
the feature can be used by creating a collection with the extra `keyOptions`
attribute as follows:

    db._create("mycollection", { keyOptions: { type: "autoincrement", offset: 1, increment: 10, allowUserKeys: true } });

The `type` attribute will make sure the keys will be auto-generated if no `_key` attribute is specified for a document.
The `allowUserKeys` attribute determines whether users might still supply own `_key` values with documents or if this
is considered an error.
The `increment` value determines the actual increment value, whereas the `offset` value can be used to seed to value
sequence with a specific starting value. This will be useful later in a multi-master setup, when multiple servers can use
different auto-increment seed values and thus generate non-conflicting auto-increment values.

The default values currently are:

- `allowUserKeys`: `true`
- `offset`: `0`
- `increment`: `1`

The only other available key generator type currently is `traditional`. The `traditional` key generator
will auto-generate keys in a fashion as ArangoDB always did (some increasing integer value, with a more or less unpredictable
increment value).

Note that for the `traditional` key generator there is no the option to disallow user-supplied keys and give the
server the sole responsibility for key generation.
2013-03-08 11:54:03 +01:00
Jan Steemann b307e4cd6d completed auto-increment key generator 2013-03-08 10:51:50 +01:00
Jan Steemann b83952c94e added test cases 2013-03-08 10:24:53 +01:00
Jan Steemann 0879cf8d15 added auto-increment key generator (not yet ready) 2013-03-07 18:17:35 +01:00