fix: EXPOSED-1040 Support SELECT without FROM table clause - #2902
Open
Leonid Stashevsky (e5l) wants to merge 2 commits into
Open
Leonid Stashevsky (e5l) wants to merge 2 commits into
Leonid Stashevsky (e5l) wants to merge 2 commits into
Conversation
Leonid Stashevsky (e5l)
requested review from
Chantal Loncle (bog-walk)
and
a lite review from Copilot
August 27, 2026 09:27
Contributor
There was a problem hiding this comment.
Pull request overview
Adds first-class support for “tableless” SELECT statements (i.e., SELECT 1 without an explicit FROM) across Exposed’s JDBC and R2DBC APIs, including convenience terminals for fetching a single projected value and documentation/tests to lock in the behavior.
Changes:
- Introduces top-level tableless
select(...)overloads (JDBC + R2DBC) backed byTable.Dual, plusselectValue(...)terminals. - Adds a generic
literal(value)helper inexposed-corefor wrapping common scalar Kotlin/Java values as SQL literals, plus tests. - Updates user documentation and changelog; refreshes SQL Server docker image tag used in dev/test infra.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| exposed-tests/src/test/kotlin/org/jetbrains/exposed/v1/tests/shared/types/LiteralOpTests.kt | New tests for literal(value) type resolution, decimal precision/scale, and unsupported types. |
| exposed-tests/src/test/kotlin/org/jetbrains/exposed/v1/tests/shared/dml/SelectExpressionTest.kt | New JDBC tests covering tableless selects, selectValue, set ops, derived table usage, and edge cases. |
| exposed-tests/src/test/kotlin/org/jetbrains/exposed/v1/tests/shared/dml/DualTableTest.kt | Removes old Table.Dual-focused test, superseded by tableless select tests. |
| exposed-r2dbc/src/main/kotlin/org/jetbrains/exposed/v1/r2dbc/Queries.kt | Adds tableless select(...) overloads and suspending selectValue(...) terminals for R2DBC. |
| exposed-r2dbc/api/exposed-r2dbc.api | Public API surface update for the new R2DBC query helpers. |
| exposed-r2dbc-tests/src/test/kotlin/org/jetbrains/exposed/v1/r2dbc/sql/tests/shared/dml/SelectExpressionTest.kt | New R2DBC tests validating tableless select and selectValue behavior. |
| exposed-r2dbc-tests/src/test/kotlin/org/jetbrains/exposed/v1/r2dbc/sql/tests/shared/dml/DualTableTest.kt | Removes old R2DBC Table.Dual test, superseded by tableless select tests. |
| exposed-jdbc/src/main/kotlin/org/jetbrains/exposed/v1/jdbc/Queries.kt | Adds tableless select(...) overloads and selectValue(...) terminals for JDBC. |
| exposed-jdbc/api/exposed-jdbc.api | Public API surface update for the new JDBC query helpers. |
| exposed-core/src/main/kotlin/org/jetbrains/exposed/v1/core/LiteralOp.kt | Adds literal(value) auto-resolver for common scalar types (+ UUID support). |
| exposed-core/src/main/kotlin/org/jetbrains/exposed/v1/core/BinaryLiteralColumnType.kt | Internal column type to render ByteArray literals using blob/hex formatting rules. |
| exposed-core/api/exposed-core.api | Public API surface update for the new literal(value) function. |
| documentation-website/Writerside/topics/DSL-Querying-data.topic | Adds a “Tableless SELECT queries” documentation chapter with examples and caveats. |
| CHANGELOG.md | Adds feature entry describing tableless select + selectValue + literal. |
| buildScripts/docker/docker-compose-sqlserver.yml | Updates SQL Server container image tag. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Leonid Stashevsky (e5l)
force-pushed
the
e5l/select-expression
branch
from
August 27, 2026 10:29
9828588 to
e1658fc
Compare
Chantal Loncle (bog-walk)
requested changes
Aug 28, 2026
Chantal Loncle (bog-walk)
left a comment
Member
There was a problem hiding this comment.
Please also check failing tests on some db?
Leonid Stashevsky (e5l)
force-pushed
the
e5l/select-expression
branch
from
August 28, 2026 10:14
0cb3e97 to
9ad2abd
Compare
Leonid Stashevsky (e5l)
force-pushed
the
e5l/select-expression
branch
from
September 18, 2026 08:47
9ad2abd to
7a28546
Compare
Leonid Stashevsky (e5l)
force-pushed
the
e5l/select-expression
branch
from
September 21, 2026 07:26
7a28546 to
29eb56a
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Introduce select expression which allows to use select statement without column set.
Type of Change
Please mark the relevant options with an "X":
Updates/remove existing public API methods:
Affected databases:
Checklist
Related Issues
EXPOSED-1040 Support SELECT without FROM table clause