Table

org.scanamo.Table
case class Table[V](name: String)(implicit evidence$1: DynamoFormat[V])

Represents a DynamoDB table that operations can be performed against

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def consistently: ConsistentlyReadTable[V]

Perform strongly consistent (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.ReadConsistency.html) read operations against this table. Note that there is no equivalent on table indexes as consistent reads from secondary indexes are not supported by DynamoDB

Perform strongly consistent (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.ReadConsistency.html) read operations against this table. Note that there is no equivalent on table indexes as consistent reads from secondary indexes are not supported by DynamoDB

Attributes

def delete(key: UniqueKey[_]): ScanamoOps[Unit]
def deleteAll(items: UniqueKeys[_]): ScanamoOps[Unit]

Deletes multiple items by a unique key

Deletes multiple items by a unique key

Attributes

def descending: TableWithOptions[V]
def filter[C : ConditionExpression](condition: C): TableWithOptions[V]

Filter the results of a Scan or Query

Filter the results of a Scan or Query

Attributes

def from[K : UniqueKeyCondition](key: UniqueKey[K]): TableWithOptions[V]

Primes a search request with a key to start from:

Primes a search request with a key to start from:

Attributes

def from(exclusiveStartKey: DynamoObject): TableWithOptions[V]

Primes a search request with a key to start from:

Primes a search request with a key to start from:

Value parameters

exclusiveStartKey

A DynamoObject containing attributes that match the partition key and sort key of the table

Attributes

Returns

A new Table which when queried will return items after the provided exclusive start key

Example
 import org.scanamo._
 import org.scanamo.syntax._
 val table: Table[_] = ???
 val exclusiveStartKey = DynamoObject(
   Map(
     "myPartitionKeyName" -> myPartitionKeyValue.asDynamoValue,
     "mySortKeyName" -> mySortKeyValue.asDynamoValue
   )
 )
 val tableStartingFromExclusiveStartKey: Table[_] = table.from(exclusiveStartKey)
def index(indexName: String): SecondaryIndex[V]

A secondary index on the table which can be scanned, or queried against

A secondary index on the table which can be scanned, or queried against

Attributes

def limit(n: Int): TableWithOptions[V]

Query or scan a table, limiting the number of items evaluated by Dynamo

Query or scan a table, limiting the number of items evaluated by Dynamo

Attributes

def put(v: V): ScanamoOps[Unit]
def putAll(vs: Set[V]): ScanamoOps[Unit]

Query a table based on the hash key and optionally the range key

Query a table based on the hash key and optionally the range key

Attributes

final def queryM[M[_] : MonoidK](query: Query[_]): ScanamoOpsT[M, List[Either[DynamoReadError, V]]]

Performs a query with the ability to introduce effects into the computation. This is useful for huge tables when you don't want to load the whole of it in memory, but scan it page by page.

Performs a query with the ability to introduce effects into the computation. This is useful for huge tables when you don't want to load the whole of it in memory, but scan it page by page.

To control how many maximum items to load at once, use queryPaginatedM

Attributes

def queryPaginatedM[M[_] : MonoidK](query: Query[_], pageSize: Int): ScanamoOpsT[M, List[Either[DynamoReadError, V]]]

Performs a scan with the ability to introduce effects into the computation. This is useful for huge tables when you don't want to load the whole of it in memory, but scan it page by page, with a maximum of pageSize items per page.

Performs a scan with the ability to introduce effects into the computation. This is useful for huge tables when you don't want to load the whole of it in memory, but scan it page by page, with a maximum of pageSize items per page.

Attributes

Note

DynamoDB will only ever return maximum 1MB of data per query, so pageSize is an upper bound.

def queryRaw(query: Query[_]): ScanamoOps[QueryResponse]

Queries the table and returns the raw DynamoDB result. Sometimes, one might want to access metadata returned in the QueryResponse object, such as the last evaluated key for example. Table#query only returns a list of results, so there is no place for putting that information: this is where query0 comes in handy!

Queries the table and returns the raw DynamoDB result. Sometimes, one might want to access metadata returned in the QueryResponse object, such as the last evaluated key for example. Table#query only returns a list of results, so there is no place for putting that information: this is where query0 comes in handy!

Attributes

Scans all elements of a table

Scans all elements of a table

Attributes

final def scanM[M[_] : MonoidK]: ScanamoOpsT[M, List[Either[DynamoReadError, V]]]

Performs a scan with the ability to introduce effects into the computation. This is useful for huge tables when you don't want to load the whole of it in memory, but scan it page by page.

Performs a scan with the ability to introduce effects into the computation. This is useful for huge tables when you don't want to load the whole of it in memory, but scan it page by page.

To control how many maximum items to load at once, use scanPaginatedM

Attributes

def scanPaginatedM[M[_] : MonoidK](pageSize: Int): ScanamoOpsT[M, List[Either[DynamoReadError, V]]]

Performs a scan with the ability to introduce effects into the computation. This is useful for huge tables when you don't want to load the whole of it in memory, but scan it page by page, with a maximum of pageSize items per page..

Performs a scan with the ability to introduce effects into the computation. This is useful for huge tables when you don't want to load the whole of it in memory, but scan it page by page, with a maximum of pageSize items per page..

Attributes

Note

DynamoDB will only ever return maximum 1MB of data per scan, so pageSize is an upper bound.

def scanRaw: ScanamoOps[ScanResponse]

Scans the table and returns the raw DynamoDB result. Sometimes, one might want to access metadata returned in the ScanResponse object, such as the last evaluated key for example. Table#scan only returns a list of results, so there is no place for putting that information: this is where scan0 comes in handy!

Scans the table and returns the raw DynamoDB result. Sometimes, one might want to access metadata returned in the ScanResponse object, such as the last evaluated key for example. Table#scan only returns a list of results, so there is no place for putting that information: this is where scan0 comes in handy!

A particular use case is when one wants to paginate through result sets, say:

Attributes

def transactDeleteAll(vs: List[UniqueKey[_]]): ScanamoOps[TransactWriteItemsResponse]
def transactPutAll(vs: List[V]): ScanamoOps[TransactWriteItemsResponse]
def transactUpdateAll(vs: List[(UniqueKey[_], UpdateExpression)]): ScanamoOps[TransactWriteItemsResponse]

Updates an attribute that is not part of the key and returns the updated row

Updates an attribute that is not part of the key and returns the updated row

Attributes

def when[T : ConditionExpression](condition: T): ConditionalOperation[V, T]

Performs the chained operation, put if the condition is met

Performs the chained operation, put if the condition is met

Attributes

Deprecated methods

def query0(query: Query[_]): ScanamoOps[QueryResponse]

Attributes

Deprecated
true
def scan0: ScanamoOps[ScanResponse]

Attributes

Deprecated
true

Inherited methods

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product