Class StatementMapper.UpsertSpec
java.lang.Object
org.springframework.data.r2dbc.core.StatementMapper.UpsertSpec
- Enclosing interface:
StatementMapper
UPSERT specification.- Since:
- 4.1
- Author:
- Christoph Strobl
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedUpsertSpec(org.springframework.data.relational.core.sql.SqlIdentifier table, Map<org.springframework.data.relational.core.sql.SqlIdentifier, Parameter> assignments, List<org.springframework.data.relational.core.sql.SqlIdentifier> conflictColumns, List<org.springframework.data.relational.core.sql.SqlIdentifier> updateColumns) -
Method Summary
Modifier and TypeMethodDescriptionstatic StatementMapper.UpsertSpecCreate anUPSERTspecification fortable.static StatementMapper.UpsertSpeccreate(org.springframework.data.relational.core.sql.SqlIdentifier table) Create anUPSERTspecification fortable.List<org.springframework.data.relational.core.sql.SqlIdentifier> org.springframework.data.relational.core.sql.SqlIdentifiergetTable()List<org.springframework.data.relational.core.sql.SqlIdentifier> withColumn(String column, Parameter value) Associate a column with aParameterand create a newStatementMapper.UpsertSpec.withColumn(String column, Parameter value) Associate a column with aParameterand create a newStatementMapper.UpsertSpec.withColumn(org.springframework.data.relational.core.sql.SqlIdentifier column, Parameter value) Associate a column with aParameterand create a newStatementMapper.UpsertSpec.withColumn(org.springframework.data.relational.core.sql.SqlIdentifier column, Parameter value) Associate a column with aParameterand create a newStatementMapper.UpsertSpec.withConflictColumn(org.springframework.data.relational.core.sql.SqlIdentifier column) Mark a column as a conflict key (typically the primary key) and create a newStatementMapper.UpsertSpec.withUpdateColumns(List<org.springframework.data.relational.core.sql.SqlIdentifier> updateColumns)
-
Constructor Details
-
UpsertSpec
protected UpsertSpec(org.springframework.data.relational.core.sql.SqlIdentifier table, Map<org.springframework.data.relational.core.sql.SqlIdentifier, Parameter> assignments, List<org.springframework.data.relational.core.sql.SqlIdentifier> conflictColumns, List<org.springframework.data.relational.core.sql.SqlIdentifier> updateColumns)
-
-
Method Details
-
create
Create anUPSERTspecification fortable.- Parameters:
table-- Returns:
- the
StatementMapper.UpsertSpec.
-
create
public static StatementMapper.UpsertSpec create(org.springframework.data.relational.core.sql.SqlIdentifier table) Create anUPSERTspecification fortable.- Parameters:
table-- Returns:
- the
StatementMapper.UpsertSpec.
-
withColumn
Associate a column with aParameterand create a newStatementMapper.UpsertSpec.- Parameters:
column-value-- Returns:
- the
StatementMapper.UpsertSpec.
-
withColumn
Associate a column with aParameterand create a newStatementMapper.UpsertSpec.- Parameters:
column-value-- Returns:
- the
StatementMapper.UpsertSpec.
-
withColumn
public StatementMapper.UpsertSpec withColumn(org.springframework.data.relational.core.sql.SqlIdentifier column, Parameter value) Associate a column with aParameterand create a newStatementMapper.UpsertSpec.- Parameters:
column-value-- Returns:
- the
StatementMapper.UpsertSpec.
-
withColumn
public StatementMapper.UpsertSpec withColumn(org.springframework.data.relational.core.sql.SqlIdentifier column, Parameter value) Associate a column with aParameterand create a newStatementMapper.UpsertSpec.- Parameters:
column-value-- Returns:
- the
StatementMapper.UpsertSpec.
-
withConflictColumn
public StatementMapper.UpsertSpec withConflictColumn(org.springframework.data.relational.core.sql.SqlIdentifier column) Mark a column as a conflict key (typically the primary key) and create a newStatementMapper.UpsertSpec.- Parameters:
column- the conflict column identifier.- Returns:
- the
StatementMapper.UpsertSpec.
-
withUpdateColumns
public StatementMapper.UpsertSpec withUpdateColumns(List<org.springframework.data.relational.core.sql.SqlIdentifier> updateColumns) -
getTable
public org.springframework.data.relational.core.sql.SqlIdentifier getTable() -
getAssignments
-
getConflictColumns
-
getUpdateColumns
-