public interface StatementMapper
PreparedOperation
. Statement mapping applies a
R2dbcDialect
-specific transformation considering
BindMarkers
and vendor-specific SQL differences.
Mapped statements
can be used directly with
DatabaseClient.sql(Supplier)
without specifying further SQL or bindings as the
prepared operation encapsulates the specified SQL operation.
Modifier and Type | Interface and Description |
---|---|
static class |
StatementMapper.DeleteSpec
DELETE specification. |
static class |
StatementMapper.InsertSpec
INSERT specification. |
static class |
StatementMapper.SelectSpec
SELECT specification. |
static interface |
StatementMapper.TypedStatementMapper<T>
Extension to
StatementMapper that is associated with a type. |
static class |
StatementMapper.UpdateSpec
UPDATE specification. |
Modifier and Type | Method and Description |
---|---|
static StatementMapper |
create(R2dbcDialect dialect,
R2dbcConverter converter)
|
default StatementMapper.DeleteSpec |
createDelete(org.springframework.data.relational.core.sql.SqlIdentifier table)
Create a
DELETE specification for table . |
default StatementMapper.DeleteSpec |
createDelete(String table)
Create a
DELETE specification for table . |
default StatementMapper.InsertSpec |
createInsert(org.springframework.data.relational.core.sql.SqlIdentifier table)
Create an
INSERT specification for table . |
default StatementMapper.InsertSpec |
createInsert(String table)
Create an
INSERT specification for table . |
default StatementMapper.SelectSpec |
createSelect(org.springframework.data.relational.core.sql.SqlIdentifier table)
Create a
SELECT specification for table . |
default StatementMapper.SelectSpec |
createSelect(String table)
Create a
SELECT specification for table . |
default StatementMapper.UpdateSpec |
createUpdate(org.springframework.data.relational.core.sql.SqlIdentifier table,
org.springframework.data.relational.core.query.Update update)
Create an
UPDATE specification for table . |
default StatementMapper.UpdateSpec |
createUpdate(String table,
org.springframework.data.relational.core.query.Update update)
Create an
UPDATE specification for table . |
<T> StatementMapper.TypedStatementMapper<T> |
forType(Class<T> type)
Create a typed
StatementMapper that considers type-specific mapping metadata. |
PreparedOperation<?> |
getMappedObject(StatementMapper.DeleteSpec deleteSpec)
Map a delete specification to a
PreparedOperation . |
PreparedOperation<?> |
getMappedObject(StatementMapper.InsertSpec insertSpec)
Map a insert specification to a
PreparedOperation . |
PreparedOperation<?> |
getMappedObject(StatementMapper.SelectSpec selectSpec)
Map a select specification to a
PreparedOperation . |
PreparedOperation<?> |
getMappedObject(StatementMapper.UpdateSpec updateSpec)
Map a update specification to a
PreparedOperation . |
default org.springframework.data.relational.core.sql.render.RenderContext |
getRenderContext()
Returns
RenderContext . |
static StatementMapper create(R2dbcDialect dialect, R2dbcConverter converter)
dialect
- must not be null.converter
- must not be null.StatementMapper
.<T> StatementMapper.TypedStatementMapper<T> forType(Class<T> type)
StatementMapper
that considers type-specific mapping metadata.T
- type
- must not be null.StatementMapper
.PreparedOperation<?> getMappedObject(StatementMapper.SelectSpec selectSpec)
PreparedOperation
.selectSpec
- the insert operation definition, must not be null.PreparedOperation
for StatementMapper.SelectSpec
.PreparedOperation<?> getMappedObject(StatementMapper.InsertSpec insertSpec)
PreparedOperation
.insertSpec
- the insert operation definition, must not be null.PreparedOperation
for StatementMapper.InsertSpec
.PreparedOperation<?> getMappedObject(StatementMapper.UpdateSpec updateSpec)
PreparedOperation
.updateSpec
- the update operation definition, must not be null.PreparedOperation
for StatementMapper.UpdateSpec
.PreparedOperation<?> getMappedObject(StatementMapper.DeleteSpec deleteSpec)
PreparedOperation
.deleteSpec
- the update operation definition, must not be null.PreparedOperation
for StatementMapper.DeleteSpec
.default StatementMapper.SelectSpec createSelect(String table)
SELECT
specification for table
.table
- StatementMapper.SelectSpec
.default StatementMapper.SelectSpec createSelect(org.springframework.data.relational.core.sql.SqlIdentifier table)
SELECT
specification for table
.table
- StatementMapper.SelectSpec
.default StatementMapper.InsertSpec createInsert(String table)
INSERT
specification for table
.table
- StatementMapper.InsertSpec
.default StatementMapper.InsertSpec createInsert(org.springframework.data.relational.core.sql.SqlIdentifier table)
INSERT
specification for table
.table
- StatementMapper.InsertSpec
.default StatementMapper.UpdateSpec createUpdate(String table, org.springframework.data.relational.core.query.Update update)
UPDATE
specification for table
.table
- StatementMapper.UpdateSpec
.default StatementMapper.UpdateSpec createUpdate(org.springframework.data.relational.core.sql.SqlIdentifier table, org.springframework.data.relational.core.query.Update update)
UPDATE
specification for table
.table
- StatementMapper.UpdateSpec
.default StatementMapper.DeleteSpec createDelete(String table)
DELETE
specification for table
.table
- StatementMapper.DeleteSpec
.default StatementMapper.DeleteSpec createDelete(org.springframework.data.relational.core.sql.SqlIdentifier table)
DELETE
specification for table
.table
- StatementMapper.DeleteSpec
.@Nullable default org.springframework.data.relational.core.sql.render.RenderContext getRenderContext()
RenderContext
.RenderContext
instance or null if RenderContext
is not availableCopyright © 2018–2022 Pivotal Software, Inc.. All rights reserved.