Skip to content

Commit

Permalink
update changelog for 0.2.1 (#78)
Browse files Browse the repository at this point in the history
  • Loading branch information
nsidnev authored May 19, 2022
1 parent c81d99c commit b639542
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 4 deletions.
15 changes: 14 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [0.3.0] - Unreleased

[Compare with 0.2.0](https://github.com/nsidnev/edgedb-elixir/compare/v0.2.0...HEAD)
[Compare with 0.2.1](https://github.com/nsidnev/edgedb-elixir/compare/v0.2.1...HEAD)

## [0.2.1] - 2022-05-19

[Compare with 0.2.0](https://github.com/nsidnev/edgedb-elixir/compare/v0.2.0...v0.2.1)

### Removed

- mention of `:repeatable_read` option for transaction isolation mode from `t:EdgeDB.edgedb_transaction_option/0`.

### Fixed

- codec name returned by codec for `std::str` from `std::uuid` to `str::str`.
- documentation for the custom codec example, which did not have a `Codec.decode/3` implementation and used the wrong protocol.

## [0.2.0] - 2022-05-03

Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ defmodule EdgeDB.MixProject do
use Mix.Project

@app :edgedb
@version "0.2.0"
@version "0.2.1"
@source_url "https://github.com/nsidnev/edgedb-elixir"
@description "EdgeDB driver for Elixir"

Expand Down
9 changes: 7 additions & 2 deletions pages/custom-codecs.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,21 +58,24 @@ defmodule MyApp.EdgeDB.Codecs.JSONPayload do

defstruct []

@impl EdgeDB.Protocol.CustomCodec
def new do
%__MODULE__{}
end

@impl EdgeDB.Protocol.CustomCodec
def name do
"default::JSONPayload"
end
end

defimpl EdgeDB.Protocol.CustomCodec, for: MyApp.EdgeDB.Codecs.JSONPayload do
defimpl EdgeDB.Protocol.Codec, for: MyApp.EdgeDB.Codecs.JSONPayload do
alias EdgeDB.Protocol.{
Codec,
CodecStorage
}

alias MyApp.EdgeDB.Codecs.JSONPayload
alias MyApp.Users.Payload

@impl Codec
Expand All @@ -83,7 +86,9 @@ defimpl EdgeDB.Protocol.CustomCodec, for: MyApp.EdgeDB.Codecs.JSONPayload do

@impl Codec
def encode(_codec, value, codec_storage) do
raise RuntimeError, "#{__MODULE__} codec can encode only #{Payload} struct"
raise EdgeDB.Error.interface_error(
"unexpected value to encode as #{inspect(JSONPayload.name())}: #{inspect(value)}"
)
end

@impl Codec
Expand Down

0 comments on commit b639542

Please sign in to comment.