systemfw / dynosaur Goto Github PK
View Code? Open in Web Editor NEWDeclarative bidirectional codecs for DynamoDb AttributeValue, SDK 2
Home Page: https://systemfw.org/dynosaur/
License: Apache License 2.0
Declarative bidirectional codecs for DynamoDb AttributeValue, SDK 2
Home Page: https://systemfw.org/dynosaur/
License: Apache License 2.0
We should be able to provide a cats.Defer
instance - this would enable usage of Defer[Schema].fix
, which would be convenient for recursion (no lazy val
, a little harder to mess up).
Edit: of course I didn't check it all the way through, recursive
is exactly like fix
. Still think the instance might be helpful, though.
Also, Invariant[Schema]
.
It would be great to be able to better communicate why a deserialization has failed via an error message.
I have a use case with dynamo where in a large dataset, we sometimes modify the schema by adding an attribute to support a new feature, but our process for adding the attribute is eventual so over the course of 24 hours, the old records get updated. The field is nullable by design of the feature, but because our update is eventual, there is a period when I need the field to be optional and nullable.
The documentation here seems to indicate this is not possible. Can this be changed?
The installing page at https://systemfw.org/dynosaur/#/installing shows libraryDependencies += "org.systemfw" %% "dynosaur" % "0.2.0"
but the source shows the corrected dynosaur-core
(and would presumably also update to show the current 0.3.0 version).
Maybe we can find a way to fail on compilation if user provided non-exhaustive ADT legs
sealed trait Foo
case class A extends Foo
case class B extends Foo
case class C extends Foo
val schema : Schema[Foo] = Schema.oneOf[Foo]{alt =>
val schemaA : Schema[A] = ???
val schemaB : Schema[B] = ???
alt(schemaA) |+| alt(schemaB) // fail to compile here, because missing schemaC
}
I like the simplicity of the current error model (just a string is sometimes exactly what you want), but currently if a union fails to decode, you get virtually no information.
Combining the errors somehow would be great to have. Some ideas:
Hi,
I noticed when calling DynamoValue.toString
the resulting JSON is missing the leading {
resulting in invalid JSON
See this test case for an example: https://github.com/SystemFw/dynosaur/blame/main/modules/core/shared/src/test/scala/DynamoValueSuite.scala#L169
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.