Skip to content

Commit

Permalink
scalafmt
Browse files Browse the repository at this point in the history
  • Loading branch information
googley42 committed Jul 27, 2023
1 parent 3cfe1ef commit 08da229
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
10 changes: 7 additions & 3 deletions dynamodb/src/it/scala/zio/dynamodb/LiveSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ object LiveSpec extends ZIOSpecDefault {
object ExpressionAttrNamesPkKeywords {
implicit val schema: Schema.CaseClass3[String, String, Option[Long], ExpressionAttrNamesPkKeywords] =
DeriveSchema.gen[ExpressionAttrNamesPkKeywords]
val (and, source, ttl) = ProjectionExpression.accessors[ExpressionAttrNamesPkKeywords]
val (and, source, ttl) = ProjectionExpression.accessors[ExpressionAttrNamesPkKeywords]
}

val mainSuite: Spec[TestEnvironment, Any] =
Expand All @@ -212,7 +212,9 @@ object LiveSpec extends ZIOSpecDefault {
withPkKeywordsTable { tableName =>
val query = DynamoDBQuery
.queryAll[ExpressionAttrNamesPkKeywords](tableName)
.whereKey(ExpressionAttrNamesPkKeywords.and === "and1" && ExpressionAttrNamesPkKeywords.source === "source1")
.whereKey(
ExpressionAttrNamesPkKeywords.and === "and1" && ExpressionAttrNamesPkKeywords.source === "source1"
)
.filter(ExpressionAttrNamesPkKeywords.ttl.notExists)
query.execute.flatMap(_.runDrain).exit.map { result =>
assert(result)(succeeds(isUnit))
Expand All @@ -234,7 +236,9 @@ object LiveSpec extends ZIOSpecDefault {
withPkKeywordsTable { tableName =>
val query = DynamoDBQuery
.querySome[ExpressionAttrNamesPkKeywords](tableName, 1)
.whereKey(ExpressionAttrNamesPkKeywords.and === "and1" && ExpressionAttrNamesPkKeywords.source === "source1")
.whereKey(
ExpressionAttrNamesPkKeywords.and === "and1" && ExpressionAttrNamesPkKeywords.source === "source1"
)
.filter(ExpressionAttrNamesPkKeywords.ttl.notExists)
for {
result <- query.execute
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ object KeyConditionExpression {
AliasMapRender.getOrInsert(ProjectionExpression.MapElement[From, To](Root, primaryKeyName))
private[dynamodb] final case class And(left: PartitionKeyExpression, right: SortKeyExpression)
extends KeyConditionExpression
def partitionKey(key: String): PartitionKey = PartitionKey(key)
def sortKey(key: String): SortKey = SortKey(key)
def partitionKey(key: String): PartitionKey = PartitionKey(key)
def sortKey(key: String): SortKey = SortKey(key)

/**
* Create a KeyConditionExpression from a ConditionExpression
Expand Down

0 comments on commit 08da229

Please sign in to comment.