class JdbcSQLQueryBuilder extends AnyRef
The builder to build a single SELECT query.
Note: All the withXXX
methods will be invoked at most once. The invocation order does not
matter, as all these clauses follow the natural SQL order: sample the table first, then filter,
then group by, then sort, then offset, then limit.
- Source
- JdbcSQLQueryBuilder.scala
- Since
3.5.0
- Alphabetic
- By Inheritance
- JdbcSQLQueryBuilder
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new JdbcSQLQueryBuilder(dialect: JdbcDialect, options: JDBCOptions)
Value Members
-
def
build(): String
Build the final SQL query that following dialect's SQL syntax.
-
def
withColumns(columns: Array[String]): JdbcSQLQueryBuilder
The columns names that following dialect's SQL syntax.
The columns names that following dialect's SQL syntax. e.g. The column name is the raw name or quoted name.
-
def
withGroupByColumns(groupByColumns: Array[String]): JdbcSQLQueryBuilder
Constructs the GROUP BY clause that following dialect's SQL syntax.
-
def
withLimit(limit: Int): JdbcSQLQueryBuilder
Saves the limit value used to construct LIMIT clause.
-
def
withOffset(offset: Int): JdbcSQLQueryBuilder
Saves the offset value used to construct OFFSET clause.
-
def
withPredicates(predicates: Array[Predicate], part: JDBCPartition): JdbcSQLQueryBuilder
Constructs the WHERE clause that following dialect's SQL syntax.
-
def
withSortOrders(sortOrders: Array[String]): JdbcSQLQueryBuilder
Constructs the ORDER BY clause that following dialect's SQL syntax.
-
def
withTableSample(sample: TableSampleInfo): JdbcSQLQueryBuilder
Constructs the table sample clause that following dialect's SQL syntax.