Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing Encoder/Decoder for Byte in OrientDB Contexts #1029

Closed
daniel-shuy opened this issue Feb 13, 2018 · 0 comments
Closed

Missing Encoder/Decoder for Byte in OrientDB Contexts #1029

daniel-shuy opened this issue Feb 13, 2018 · 0 comments

Comments

@daniel-shuy
Copy link

daniel-shuy commented Feb 13, 2018

Version: 2.3.2
Module: quill-orientdb
Database: OrientDB

Expected behavior

Built-in Encoder/Decoder for Byte (according to https://orientdb.com/docs/last/Types.html, Bytes are supported).

Actual behavior

Missing Encoder/Decoder for Byte.

Workaround

import io.getquill._

lazy val ctx = new OrientDBSyncContext(SnakeCase, "ctx")

implicit val byteEncoder: Encoder[Byte] = ctx.encoder((index, value, row) => {
  row.insert(index, value)
  row
})

implicit val byteDecoder: Decoder[Byte] = ctx.decoder((index, row) => {
  row.field[Byte](row.fieldNames()(index))
})

@getquill/maintainers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants