Releases: jcabi/jcabi-dynamo
AttributeValueUpdate
Item.put()
is working with AttributeValueUpdate
instead of AttributeValue
, which makes it possible to do ADD/REMOVE operations on attributes.
JDK6 compatible
This version is JDK6 compatible
withIndexName() and withSelect()
Two new methods added to QueryValve
: withIndexName()
and withSelect()
More RetryOnFailure annotations
In this version all methods in com.jcabi.dynamo.retry
package are annotated with @RetryOnFailure
, without exception
MkRegion
This version introduces a new class MkRegion
, which mocks DynamoDB in a file (H2 database, at the moment):
@Test
public void createsAndDeletesItems() {
final Region region = new MkRegion(
new H2Data().with(
"users",
new String[] {"id"},
new String[] {"name", "age"}
)
);
final Table table = region.table("users");
table.put(
new Attributes()
.with("id", 10783)
.with("name", "Jeff Lebowski")
.with("age", 35)
);
MatcherAssert.assertThat(
table.frame().iterator().next().get("name"),
Matchers.equalTo("Jeff Lebowski")
);
}
Longer waiting time in ReRegion
In this version, ReRegion
waits longer between attempts, which is supposed to fix problems with temporary absent connection or inability to load credentials. See #4
com.jcabi.dynamo.retry package
This version introduces a new package com.jcabi.dynamo.retry
with a number of wrapper, including ReRegion
(see #3). They retry all AWS calls at least three times before giving up. It's is strongly recommended to use them in production environments, since AWS SDK may act strange sometimes throwing runtime exceptions without cause. For example:
Region region = new ReRegion(new Region.Simple(credentials));
TableMocker#createIfAbsent()
New method TableMocker#createIfAbsent()
added, that simplifies table creation in test scripts and unit tests.
Upgrade to AWS SDK 1.6.0
Version of AWS SDK was upgraded to 1.6.0, which solved a few problems, including the one reported in #2.
Bug fix in AwsItem
AwsItem
had a wrong assumption that item keys are the same as its attributes. The problem was fixed in this release.