Skip to content

Releases: guregu/dynamo

CreateTable attributes fix, less dependencies

01 Feb 22:36
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v1.18.0...v1.18.1

Projections for Batch Get

24 Jan 05:06
Compare
Choose a tag to compare

This release adds projection support for batch gets and updates the AWS dependencies.

What's Changed

New Contributors

Full Changelog: v1.17.0...v1.18.0

Auto-retry transactions

10 Oct 15:18
Compare
Choose a tag to compare

This release adds automatic retrying behavior to transactions. See: #203.

What's Changed

  • Automatically retry transactions (#204)
  • Add IsCondCheckFailed function for working with conditional check failed errors

Full Changelog: v1.16.0...v1.17.0

allowemptyelem nesting

12 Aug 13:01
f4c2f4c
Compare
Choose a tag to compare

What's Changed

  • Adding allowemptyelem support for nested maps and slices by @veedubyou in #200 (fixes #199)

New Contributors

Full Changelog: v1.15.1...v1.16.0

Map field unmarshal fix

04 May 07:55
178cb03
Compare
Choose a tag to compare

What's Changed

  • Fix map fields not getting cleared on unmarshal by @guregu in #196
    • regression from v1.12.0, prior versions not affected

Full Changelog: v1.15.0...v1.15.1

Table waiters

21 Mar 15:28
757bab6
Compare
Choose a tag to compare

Summary

This release adds table waiters (#52 via #193).

  • CreateTable.Wait() creates the table, then blocks until the table is active
  • DeleteTable.Wait() deletes the table, then blocks until the table is finished deleting
  • Table.Wait(...) blocks until the table's status matches one of the arguments (for custom waiting purposes)

Example

// blocks until table is ready to use
if err := db.CreateTable(name, Widget{}).Wait(); err != nil {
	panic(err)
}

// blocks until table is finished deleting
if err := db.Table(name).DeleteTable().Wait(); err != nil {
	panic(err)
}

What's Changed

Full Changelog: v1.14.0...v1.15.0

ExpressionLiteral

08 Mar 16:38
Compare
Choose a tag to compare

Summary

This release adds a new type, ExpressionLiteral (#192). It represents a raw DynamoDB expression and placeholders, using the same data types as the official AWS package. You can pass this as a parameter to any method that takes an expression. Both $ and ? will work as variables. dynamo will automatically merge your placeholders with its own, so you can use this in tandem with the rest of the library.
Some use cases include porting projects from the official SDK, and passing around search parameters in APIs.
Be careful, using this is akin to manipulating SQL queries with string concatenation. Make sure you know what you're doing if you use it. Only reach for this hammer when the regular APIs don't cut it.

Example

lit := dynamo.ExpressionLiteral{
	Expression: "#meta.#foo = :bar",
	AttributeNames: aws.StringMap(map[string]string{
		"#meta": "Meta",
		"#foo":  "foo",
	}),
	AttributeValues: map[string]*dynamodb.AttributeValue{
		":bar": {S: aws.String("bar")},
	},
}

err := table.Get("UserID", 42).
	Filter("?", lit). // $ also works. 
	All(&result)

What's Changed

  • add ExpressionLiteral for passing in raw expressions and placeholders by @guregu in #192

Full Changelog: v1.13.0...v1.14.0

v1.13.0

19 Feb 17:26
Compare
Choose a tag to compare

Summary

  • Add server-side encryption (SSE) support in CreateTable and DescribeTable #189 (thanks @TigerToof!)
  • Tweak the logic for inferring the table's primary keys PagingIter.LastEvaluatedKey #191
    • This change can better avoid calling DescribeTable depending on your usage.
    • Errors from DescribeTable (such as insufficient permissions) will be treated as warnings, falling back to pre-v1.12.0 behavior.
  • Warnings now use the logger configured in aws.Config instead of the standard library default.

What's Changed

  • Add SSESpecification option to CreateTable by @TigerToof in #189
  • lazier LastEvaluatedKey inference by @guregu in #191

New Contributors

  • @TigerToof made their first contribution in #189

Full Changelog: v1.12.0...v1.13.0

v1.12.0

06 Feb 17:38
Compare
Choose a tag to compare

Summary

  • This release fixes two issues:
    • #186 LastEvaluatedKey may point unexpected position in case Limit is set to Query
    • #181 UnmarshalItem does not work with the auxiliary types
  • Also upgrades dependencies.

What's Changed

  • virtual PagingIter.LastEvaluatedKey by @guregu in #187
  • improve embedded struct decoding, fixing aux unmarshaling by @guregu in #188
  • Upgrade backoff to backoff/v4 by @pquerna in #180

New Contributors

Full Changelog: v1.11.0...v1.12.0

Lots of small improvements

02 Sep 12:02
Compare
Choose a tag to compare

This release integrates lots of pull requests from the community. Thanks for the PRs, everyone.

Although this PR doesn't add any shiny new functionality, it introduces a new error called ErrNoInput that is returned if you use the batch/transaction APIs without providing it any input. See #174.