- Bump rusoto dependencies to version from
0.44
to0.45
- fixed issue with dynomite renamed
partition_key
fields which copied unrelated attributes into the generated KeyStruct. These unrelated attributes are now omitted. #130
-
Introduce new
#[dynomite(default)]
field attribute which permits the absence of field values in DynamoDB. These will be replaced with their default value when deserializing item data #113 -
Introduce new
#[derive(Attributes)]
attribute for structs for deriving a subsets of attributes for projections #115This is similar to
#[derive(Item)]
except that it does not require a#[dynomoite(partition_key)]
-
Items
will now fail at compile time when they don't have a single#[dynomoite(partition_key)]
fieldAll DynamoDB items require a uniquely identifiable attribute. This enforces that fact
-
Derive compilation errors are now more helpful! More errors will now indicate where in source in context where problems occur.
-
ItemKey structs now honor all Item field attributes.
Previously if you had declared a renamed partition key named
foo
#[dynomite(partition_key, rename = "Foo")] foo: String,
you would end out with a ItemKey struct with a field named
Foo
. This was not intended. These ItemKey struct fields will now be properly namedfoo
but deserialized asFoo
.
- Bump rusoto dependencies to version
0.44
- Add
Attribute
support for time types includingstd::time::SystemTime
,chrono::DateTime<{Utc,Local,FixedOffset}>
#101 #102
- Breaking change. upgrade to rusoto@0.43.0 which itself is contains a number of breaking changes, albeit very useful ones. Dynomite is now based on standard libraries futures which means that async/await style programming are supported out of the box. This also impacted the dependency of
futures
upgraded to0.3
which included breaking changes in streams apis which impacted autopaginating interfaces. See theexamples/
directory in this repo for up to date examples of current usage - Breaking change. Dropped
failure
crate support. This wasn't adding any value overstd::error::Error
and was removed as an unnecessary dependency and replaced with an impl ofstd::error::Error
- Breaking change. Improved support for optional attribute values #84
Previously Dynomite's support for Option
types did not map correctly to DynamoDB's notion of null value types: in serialized form { "NULL": true }
. Instead, Dynomite would not serialize the field at all which in some cases would not actually nullify the field in DynamoDB. Kudos to @elslooo for discovering and fixing the bug. Because some applications may have relied on this previous behavior, we're bumping the version.
- Breaking change. Rename Item attributes to align with current aws docs #76
#[hash]
and #[range]
are now more closely aligned with the AWS docs vocabulary
#[hash]
is now #[dynomite(partition_key)]
#[range]
is now #[dynomite(sort_key)]
This was a breaking change but one we think was worth it.
- Item fields now support renaming #68
Those familiar with #[serde(rename = "actualName")]
will feel at home with #[dynomite(rename = "actualName)]
. This feature brings a welcome ergnomic improvement when interacting with DynamoDB tables with attributes that don't follow Rust's naming conventions.
- Upgrade to the latest rusoto version
0.40.0
- Upgrade to latest rusoto version
0.39.0
This introduces a change to Rusoto DynamoDB where the representation of the DynamoDB value type binary
types changed from Vec<u8>
to bytes::Bytes
. This should not break existing applications but dynomite users now get transparent support for Items which declare fields of type byte::Bytes
, which will be interpreted the same opaque binary blob of bytes, for free.
- added a new
rustls
feature flag which when enabled replaces openssl withrustls
#54
- Upgrade to latest rusoto version
0.38.0
- Upgrade to latest rusoto version (
0.37.0
) with added support for new DynamoDB methodsdescribe_endpoints
,transact_get_items
, andtransact_write_items
. - Upgrading to the latest rusoto means that clients are Cloneable. As such,
Arc
restrictions are removed on stream-based auto-pagination interfaces.
- Add support for configuring policies for retrying requests based on DynamoDB recommendations
use dynomite::{Retries, retry::Policy};
use dynomite::dynamodb::{DynamoDb, DynamoDbClient};
fn main() {
let client =
DynamoDbClient::new(Default::default())
.with_retries(Policy::default());
// any client operation will now be retried when
// appropriate
let tables = client.list_tables(Default::default());
// other important work...
}
- update documentation to highlight more concisely areas of focus
-
upgraded to 2018 edition
- a side effect of this is that an interaction with 2018-style imports caused a name conflict with
dynomite::Item
and nowdynomite_derive::Item
. As a result the dynomite crate now has a compiler feature flag called "derive" which is no by default that resolves this. If you do not wish to have the feature enabled by default add the following to your Cargo.toml
[dependencies.dynomite] version = "0.2" default-features = false features = ["uuid"]
- a side effect of this is that an interaction with 2018-style imports caused a name conflict with
-
updates to supported Attribute type conversions
- numeric sets (NS) no longer support vec type conversions, only sets types!
- list types (L) now support any type that implements
Attribute
, previously this only supported lists of types that implementedItem
(a complex time). This means lists of scalars are now supported by default Cow<str>
is now supported for String AttributesFromAttributes
is now implemented forXXXMap
types ofString
toAttribute
types. This means you now get free, Item-link integration for homogenious maps- much needed unit tests now cover the correctness of implementations!
-
(breaking change) the
DynamoDbExt.stream_xxx
methods which produced auto-paginating streams have been renamed toDynamoDbExt.xxx_pages
to be more intention-revealing and inline with naming conventions of other language sdk's methods that implement similar functionality.
-
updated dependencies
Rusoto-*
0.34 -> 0.36
- add Stream oriented extension interfaces for paginated apis
By default, the DyanomoDb
apis list_backups
, list_tables
, query
, scan
all require application management of pagination using inconsistent api's.
This release brings a consistent interface for each with extension methods prefixed with stream_
which return a consistent interface for retrieving a futures::Stream
of their
respective values.
-
add
maplit!
inspiredattr_map!
helper macro useful in query contexts when providingexpression_attribute_values
-
pin rusoto crate versioning to minor release
0.34
In the past this crate was pinned to a major version of rusoto. It will be pinned to a minor version going forward.
See the demo application for examples of updated interfaces.
- fix examples for rusoto breaking changes in 0.32, async release
- fix
dynomite-derive
dynomite
dependency version
- initial release