Skip to content

v0.5.0

Choose a tag to compare

@jeanbza jeanbza released this 08 Aug 17:47
  • bigquery:
    • The SQL types DATE, TIME and DATETIME are now supported. They correspond to
      the Date, Time and DateTime types in the new cloud.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.
  • 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.
      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:
      q := datastore.NewQuery("Kind").Namespace("ns")
    • All the fields of Key are exported. That means you can construct any Key with a struct literal:
      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 by IncompleteKey. Replace
      NewIncompleteKey(ctx, kind, parent)
      with
      IncompleteKey(kind, parent)
      and if you do use namespaces, make sure you set the namespace on the returned key.
    • NewKey has been removed, replaced by NameKey and IDKey. Replace
      NewKey(ctx, kind, name, 0, parent)
      NewKey(ctx, kind, "", id, parent)
      with
      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. Replace datastore.Done with iterator.Done, from the package google.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.