Skip to main content
Version: 2.x

deleteFrom

def deleteFrom[From: Schema](
tableName: String
)(
primaryKeyExpr: KeyConditionExpr.PrimaryKeyExpr[From]
): DynamoDBQuery[Any, Option[From]] = ???

The deleteFrom operation is used to remove an item from a table. The primaryKeyExpr param can be created using the ProjectionExpression's in the companion object for model class:

for {
_ <- DynamoDBQuery.deleteFrom("person")(Person.id.primaryKey === "1").execute
} yield ()

deleteFrom query operationsโ€‹

<DELETE_QUERY>
.returns(<ReturnValues>) // ReturnValues.AllOld | ReturnValues.None <default>
.where(<ConditionExpression>)

ZIO Chat

Hello! ๐Ÿ˜Š I'm your ZIO Chat Bot, designed to be your go-to resource for all things ZIO! Whether you're new to this powerful functional effect system or a seasoned pro, I'm here to assist you. ZIO empowers you to build concurrent and resilient applications in Scala, offering referential transparency, composable data types, type-safety, and more. So, go ahead and ask me anything about ZIO โ€“ I'm here to provide the answers you need! ๐Ÿค–