Skip to content

Commit

Permalink
Fix 404ing docs links (#1156)
Browse files Browse the repository at this point in the history
Internal docs links are pointing to the source filename rather than the generated page
  • Loading branch information
kittsville committed Oct 29, 2021
1 parent b1d3049 commit 0846e9e
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 21 deletions.
4 changes: 2 additions & 2 deletions docs/docs/conditional-operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ position: 3

## Conditional Operations

Modifying operations ([Put](operations.md#put-and-get), [Delete](operations.md#delete), [Update](operations.md#update)) can be performed conditionally, so that they only have an effect if some state of the DynamoDB table is true at the time of execution.
Modifying operations ([Put](operations.html#put-and-get), [Delete](operations.html#delete), [Update](operations.html#update)) can be performed conditionally, so that they only have an effect if some state of the DynamoDB table is true at the time of execution.

```scala mdoc:silent
import org.scanamo._
Expand Down Expand Up @@ -43,4 +43,4 @@ LocalDynamoDB.withTable(client)("gremlins")("number" -> N) {
}
```

More examples can be found in the `Table` scaladoc.
More examples can be found in the `Table` scaladoc.
6 changes: 3 additions & 3 deletions docs/docs/filters.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ position: 4

## Filters

[Scans](operations.md#scan) and [Queries](operations.md#query) can be filtered within Dynamo, preventing the memory, network and marshalling overhead of filtering on the client.
[Scans](operations.html#scan) and [Queries](operations.html#query) can be filtered within Dynamo, preventing the memory, network and marshalling overhead of filtering on the client.

Note that these filters do *not* reduce the [consumed capacity](http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.ProvisionedThroughput.html) in Dynamo. Even though a filter may lead to a small number of results being
returned, it could still exhaust the provisioned capacity or force the provisioned capacity to autoscale up to an expensive level.

Expand All @@ -32,7 +32,7 @@ LocalDynamoDB.withTable(client)("Station")("line" -> S, "name" -> S) {
Station("Metropolitan", "Croxley", 7),
Station("Jubilee", "Canons Park", 5)
))
filteredStations <-
filteredStations <-
stationTable
.filter("zone" < 8)
.query("line" === "Metropolitan" and ("name" beginsWith "C"))
Expand Down
8 changes: 4 additions & 4 deletions docs/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import org.scanamo._
import org.scanamo.syntax._
import org.scanamo.generic.auto._
import software.amazon.awssdk.services.dynamodb.model.ScalarAttributeType._

val client = LocalDynamoDB.syncClient()
val scanamo = Scanamo(client)
val farmersTableResult = LocalDynamoDB.createTable(client)("farmer")("name" -> S)
Expand All @@ -49,11 +49,11 @@ scanamo.exec(table.put(Farmer("McDonald", 156L, Farm(List("sheep", "cow")))))
scanamo.exec(table.get("name" === "McDonald"))
```

Scanamo supports most other DynamoDB [operations](operations.md), beyond
Scanamo supports most other DynamoDB [operations](operations.html), beyond
the basic `Put` and `Get`.

The translation between Dynamo items and Scala types is handled by a type class
called [DynamoFormat](dynamo-format.md).
called [DynamoFormat](dynamo-format.html).

Licensed under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0).

Expand All @@ -74,4 +74,4 @@ Licensed under the [Apache License, Version 2.0](http://www.apache.org/licenses/

```scala mdoc:invisible
LocalDynamoDB.deleteTable(client)("farmer")
```
```
24 changes: 12 additions & 12 deletions docs/docs/operations.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
layout: docs
title: Operations
title: Operations
position: 1
---

Expand All @@ -11,18 +11,18 @@ Scanamo supports all the DynamoDB operations that interact with individual items
* [Put](#put-and-get) for adding a new item, or replacing an existing one
* [Get](#put-and-get) for retrieving an item by a fully specified key
* [Delete](#delete) for removing an item
* [Update](#update) for updating some portion of the fields of an item, whilst leaving the rest
* [Update](#update) for updating some portion of the fields of an item, whilst leaving the rest
as is
* [Scan](#scan) for retrieving all elements of a table
* [Query](#query) for retrieving all elements with a given hash-key and a range key that matches
some criteria
Scanamo also supports [batched operations](batch-operations.md), [conditional operations](conditional-operations.md)
and queries against [secondary indexes](using-indexes.md).

Scanamo also supports [batched operations](batch-operations.html), [conditional operations](conditional-operations.html)
and queries against [secondary indexes](using-indexes.html).

### Put and Get

Often when using DynamoDB, the primary use case is simply putting objects into
Often when using DynamoDB, the primary use case is simply putting objects into
Dynamo and subsequently retrieving them:

```scala mdoc:silent
Expand All @@ -49,7 +49,7 @@ scanamo.exec {
}
```

Note that when using `Table` no operations are actually executed against DynamoDB until `exec` is called.
Note that when using `Table` no operations are actually executed against DynamoDB until `exec` is called.

### Delete

Expand Down Expand Up @@ -96,7 +96,7 @@ val teamTable = Table[Team]("teams")
scanamo.exec {
for {
_ <- teamTable.put(Team("Watford", 1, List("Blissett"), Some("Harry the Hornet")))
updated <- teamTable.update("name" === "Watford",
updated <- teamTable.update("name" === "Watford",
set("goals", 2) and append("scorers", "Barnes") and remove("mascot"))
} yield updated
}
Expand Down Expand Up @@ -124,7 +124,7 @@ case class FavouriteUpdate(name: String, colour: Option[String], number: Option[

def updateFavourite(fu: FavouriteUpdate): Option[ScanamoOps[Either[DynamoReadError, Favourites]]] = {
val updates: List[UpdateExpression] = List(
fu.colour.map(c => set("colour", c)),
fu.colour.map(c => set("colour", c)),
fu.number.map(n => set("number", n))
).flatten
NonEmptyList.fromList(updates).map(ups =>
Expand Down Expand Up @@ -154,7 +154,7 @@ Further examples, showcasing different types of update can be found in the scala

### Scan

If you want to go through all elements of a table, or index, Scanamo
If you want to go through all elements of a table, or index, Scanamo
supports scanning it:

```scala mdoc:silent
Expand Down Expand Up @@ -204,4 +204,4 @@ LocalDynamoDB.deleteTable(client)("villains")
LocalDynamoDB.deleteTable(client)("teams")
LocalDynamoDB.deleteTable(client)("favourites")
LocalDynamoDB.deleteTable(client)("lines")
```
```

0 comments on commit 0846e9e

Please sign in to comment.