Comments (1)
I had also wondered what the type safe version of this was, but took a different approach.
Basically for every "rich" composite sort key (A, B, C)
you should be able to query starts with using (A)
and (A, B)
as well
sealed trait CompositeValue2[A, +B]
final case class One[A](x: A) extends CompositeValue2[A, Nothing]
object CompositeValue2 {
implicit def attrKey2Encoder[A, B](implicit
A: DynamoStringEncoder[A]
): Encoder[CompositeValue2[A, B]] =
Encoder[String]
.contramap { case One(x) =>
A.toDynamoString(x)
}
}
So every composite value One(a)
or Two(a, b)
would extend Three[A, B, C]
and use Nothing
/inheritance.
from meteor.
Related Issues (14)
- Publish scaladoc HOT 2
- The default Encoder[Instant] instance fails for dates very far in the future HOT 1
- Simple Global Secondary Index Query Support HOT 8
- Consider Removing Limit From Query Interface HOT 4
- Any plan to support scala 3? HOT 11
- scalajs support
- Add support for `scanIndexForward`
- Why is the jClient a member of the tables? HOT 1
- Support ConditionExpression for DeleteItem HOT 3
- On Decoding error, the Dynosaur Conversions do not propagate error message
- Please publish meteor-dynosaur 1.0.55 for Scala 2.13
- ExpressionAttributeValues must not be empty
- Support BatchWriteItem
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from meteor.