google-cloud v0.5.0 Release Notes
-
- bigquery:
- The SQL types DATE, TIME and DATETIME are now supported. They correspond to
the
Date
,Time
andDateTime
types in the newcloud.google.com/go/civil
package. - Support for query parameters.
- Support deleting a dataset.
- Values from INTEGER columns will now be returned as int64, not int. This will avoid errors arising from large values on 32-bit systems.
- The SQL types DATE, TIME and DATETIME are now supported. They correspond to
the
- datastore:
- Nested Go structs encoded as Entity values, instead of a
flattened list of the embedded struct's fields. This means that you may now have twice-nested slices, eg.
go type State struct { Cities []struct{ Populations []int } }
See the announcement for more details. - Contexts no longer hold namespaces; instead you must set a key's namespace explicitly. Also, key functions have been changed and renamed.
- The WithNamespace function has been removed. To specify a namespace in a Query, use the Query.Namespace method:
go q := datastore.NewQuery("Kind").Namespace("ns")
- All the fields of Key are exported. That means you can construct any Key with a struct literal:
go k := &Key{Kind: "Kind", ID: 37, Namespace: "ns"}
- As a result of the above, the Key methods Kind, ID, d.Name, Parent, SetParent and Namespace have been removed.
NewIncompleteKey
has been removed, replaced byIncompleteKey
. Replacego NewIncompleteKey(ctx, kind, parent)
withgo IncompleteKey(kind, parent)
and if you do use namespaces, make sure you set the namespace on the returned key.NewKey
has been removed, replaced byNameKey
andIDKey
. Replacego NewKey(ctx, kind, name, 0, parent) NewKey(ctx, kind, "", id, parent)
withgo NameKey(kind, name, parent) IDKey(kind, id, parent)
and if you do use namespaces, make sure you set the namespace on the returned key.- The
Done
variable has been removed. Replacedatastore.Done
withiterator.Done
, from the packagegoogle.golang.org/api/iterator
. - The
Client.Close
method will have a return type of error. It will return the result of closing the underlying gRPC connection. - See the announcement for more details.
- Nested Go structs encoded as Entity values, instead of a
flattened list of the embedded struct's fields. This means that you may now have twice-nested slices, eg.
- bigquery: