Class SqlGenerator
java.lang.Object
org.springframework.data.jdbc.core.convert.SqlGenerator
Generates SQL statements to be used by
SimpleJdbcRepository- Author:
- Jens Schauder, Yoichi Imai, Bastian Wilhelm, Oleksandr Kucher, Mark Paluch, Tom Hombergs, Tyler Van Gorder, Milan Milanov, Myeonghyeon Lee, Mikhail Polivakha, Chirag Tailor, Diego Krupitza, Hari Ohm Prasath, Viktor Ardelean, Kurt Niemi
-
Method Summary
Modifier and TypeMethodDescriptioncountByQuery(Query query, MapSqlParameterSource parameterSource) Constructs a single sql query that performs select count based on the provided query.createSelectBuilder(Table table, Predicate<AggregatePath> pathFilter) Create a basic select structure with all the necessary joinsexistsByQuery(Query query, MapSqlParameterSource parameterSource) Constructs a single sql query that performs select count based on the provided query for checking existence.selectByQuery(Query query, MapSqlParameterSource parameterSource) Constructs a single sql query that performs select based on the provided query.selectByQuery(Query query, MapSqlParameterSource parameterSource, Pageable pageable) Constructs a single sql query that performs select based on the provided query and pagination information.
-
Method Details
-
createSelectBuilder
public SelectBuilder.SelectWhere createSelectBuilder(Table table, Predicate<AggregatePath> pathFilter) Create a basic select structure with all the necessary joins- Parameters:
table- the table to base the select onpathFilter- a filter for excluding paths from the select. All paths for which the filter returns true will be skipped when determining columns to select.- Returns:
- a select structure suitable for constructing more specialized selects by adding conditions.
- Since:
- 4.0
-
extractEmbeddedPropertyName
-
extractFieldNameFromEmbeddedProperty
-
selectByQuery
Constructs a single sql query that performs select based on the provided query. Additional the bindings for the where clause are stored after execution into theparameterSource- Parameters:
query- the query to base the select on. Must not be nullparameterSource- the source for holding the bindings- Returns:
- a non null query string.
-
selectByQuery
Constructs a single sql query that performs select based on the provided query and pagination information. Additional the bindings for the where clause are stored after execution into theparameterSource- Parameters:
query- the query to base the select on. Must not be null.parameterSource- the source for holding the bindings.pageable- the pageable to perform on the select.- Returns:
- a non null query string.
-
existsByQuery
Constructs a single sql query that performs select count based on the provided query for checking existence. Additional the bindings for the where clause are stored after execution into theparameterSource- Parameters:
query- the query to base the select on. Must not be nullparameterSource- the source for holding the bindings- Returns:
- a non null query string.
-
countByQuery
Constructs a single sql query that performs select count based on the provided query. Additional the bindings for the where clause are stored after execution into theparameterSource- Parameters:
query- the query to base the select on. Must not be nullparameterSource- the source for holding the bindings- Returns:
- a non null query string.
-