v5.0.0 (Upcoming)
5.0.0 is a major upgrade from 4.2.5. Dataway has been rewritten with an independent core, framework adapters, metadata providers, and a replaceable console. DataQL introduces a redesigned engine and extension API, and the SQL executor has been reimplemented. Upgrading requires changes to dependencies, configuration, Java APIs, and storage structures.
<dependency>
<groupId>net.hasor</groupId>
<artifactId>dataway-embedded</artifactId>
<version>5.0.0</version>
</dependency>
Web applications can choose a Spring, Solon, or Hasor adapter. Add the SQL executor and metadata provider as separate dependencies.
Changes
Dataway rewrite
- Decoupled the core from Hasor.
DatawayConfigholds configuration andDatawaycreates services. Spring, Solon, and Hasor adapters integrate with their host containers and Web lifecycles. - Separated business APIs, management APIs, console resources, and documentation into four Web handlers with configurable paths. Business API, management, and documentation endpoints are enabled as needed.
- Separated management from execution.
AdminServicemanages drafts, state, publication, disabling, deletion, and history.ApiServicelets Java code invoke published, enabled APIs by HTTP method and path or API ID. - Retained drafts, published snapshots, and history, with added revision conflict checks and atomic batch writes. Routes are identified by method and path; draft changes take effect externally after publication.
- Rebuilt authorization: applications handle login,
IdentityProvidersupplies identities, andAuthorizationCheckchecks operations. Preset identities provide no access, API access, read-only console access, or full administration. - Replaced execution extensions with
AdminInterceptorandApiInterceptor, supporting before/after processing, exception handling, and short-circuit returns. Contexts expose targets, operations, and identities; API interceptors also distinguish HTTP, debugging, and Java calls. - Unified API execution, console debugging, and Java invocation through
DatawayEngineandDatawayQueryfor parameter preparation, script execution, and result processing.
Metadata and transactions
- Separated JDBC and Nacos providers into
dataway-meta-jdbcanddataway-meta-nacos. Applications select storage throughApiDataAccessLayer. - Added table, field, and Nacos entity name mappings to
DatawayConfig.SCRIPTstores the original script; SQL scripts are compiled as fragments when queries are created. - Provided schema scripts for MySQL, PostgreSQL, Oracle, SQL Server, and H2. JDBC batch writes use independent transactions by default and can join host transactions through framework-specific
JdbcExecutoradapters. - Nacos uses configuration snapshots and CAS for version consistency, with support for reading the previous layout during migration.
- Business SQL connections and metadata transactions are configured separately. Spring, Solon, and Hasor adapters connect ordinary SQL,
tran.*functions, and application transactions.
Requests, results, and console
- Unified JSON, URL-encoded form, and multipart parsing, including repeated form fields, uploads, and parameter wrapping. Upload storage has configurable memory thresholds and temporary directories, with cleanup after requests.
- Connected Web functions to the current request and response for Header/Cookie access and uploaded files. HTTP objects are passed through query context and cleared after execution.
- Added
BinaryModelfor binary values in scripts and file responses. - Unified response output through
ResultHandler, with Structure, Raw Value, CSV, Text, and Verify Code handlers. Supports a default handler, handler-specific defaults, and per-API options; custom handlers control status, headers, and body. - Migrated and upgraded console components while retaining editing, debugging, publication, and history operations. Results support JSON, text, table, and image previews and file downloads.
- Packaged console resources as
dataway-embedded-web, supporting separate builds, replacement, and frontend/backend deployment.initializer.jsconfigures backend URLs; development supports Mock and proxy modes. - Reimplemented documentation generation with OpenAPI 3.0 and Swagger 2.0 endpoints. Only published, enabled APIs are exported and can be invoked through Swagger UI.
DataQL engine
- Extracted
dataql-engine, with queries created throughHostConfiguration → QueryManager → QueryBuilder → Query, supporting standalone use and JSR-223. - Reorganized Finder, resource loading, application object imports, function libraries, and external fragments. SPI discovers extensions; host attachments provide shared services.
- Unified UDF arguments as
UdfParams.setHint(String, Object)passes object references, andCustomizeScopeprovides custom scopes. Dataway merges request parameters with defaults. - Moved general function libraries into the engine. Web functions are supplied by Dataway; SQL and transaction functions are supplied by the SQL executor.
- Corrected operator precedence and short-circuit evaluation, comments, negative numbers, scientific notation, string escaping, fragment arguments, and nested function exits.
- Fixed Hint propagation, query cloning, Lambda scope restoration, collection indexing and callbacks, string functions, and HMAC algorithm selection.
- Fixed character, enum, and numeric-to-boolean conversions, missing object fields, and numeric width Hint defaults.
SQL executor
- Introduced the independent
dataql-sqlprocmodule, reimplemented using dbVisitor dynamic SQL, type handling, and dialect capabilities. Supports SQL, XML tags, batch execution, stored procedures, multiple results, and pagination. ConnectionProvidersupplies default or named data source connections.TransactionalProvideradds transaction support, including propagation, isolation, and transaction functions.- Added extension points for SQL execution interceptors, shared fragments, rules, type handlers, and pagination dialects.
- Expanded positional and named parameters, text substitution, rule arguments, and parameter options. Added CASE/WHEN/ELSE and PAIRS rules, and fixed nested expressions, quotes, commas, and parameter marker escaping.
- Added dialects for Hive, ClickHouse, MongoDB, Elasticsearch, and Milvus, and fixed pagination metadata synchronization and repeated queries. Non-relational sources require the corresponding dbVisitor JDBC driver.
- Adapted type handling to the DataQL data model, including list-to-JDBC-array binding and JSON, binary, and vector conversion. Fixed CHAR/NCHAR truncation, result type detection, and time zone offset handling.
- Simplified
TypeHandler, retaining explicit registration and parameter-level configuration while removing inapplicable Java mappings and handlers. Fixed XML trim handling and SQL Hint defaults.
Build, examples, and documentation
- Established an independent repository with Gradle builds. Engine, SQL, console, framework adapters, and storage providers are published separately; example applications use Maven.
- Unified JSON utilities on Jackson. Upgraded Cobble to
5.0.4, dbVisitor to6.8.2, and Hasor to5.3.0. The SQL executor bundles and relocates OGNL to reduce application dependency conflicts. - Added Spring, Solon, Hasor, Spring + Nacos, and DataQL transformation examples covering authentication, multiple data sources, transactions, forms, uploads, result handlers, and Swagger UI.
- Expanded engine, DAL, function, storage, and Web request tests. Framework tests start real Boot servers and verify integration through HTTP; executable documentation tests validate examples.
- Reorganized Chinese and English documentation, SQL references, blog posts, and migration guidance, with a
llms.txtdocumentation index.
Upgrade notes
- Dependencies and configuration: capabilities from
hasor-dataway,hasor-dataql, andhasor-dataql-fxare split across the new modules. Replace dependencies and configure endpoints, storage, and identities using the integration guides. Do not mix both runtimes. - Java and SPI: use
AdminServicefor management andApiServicefor published API calls. Migrate execution and serialization SPI implementations to interceptors and result handlers; integrate login throughIdentityProvider. - Engine extensions: update UDF signatures to
UdfParamsand adapt Finder, fragment, and host configuration APIs. Recompile original scripts instead of reusing previously generated QIL. - Metadata: back up storage and preserve API IDs, original scripts, and publication history. Add revision and route constraints. Map
SCRIPT_ORIwhen it contains the original script, and handle the Nacos layout change separately. - Responses: select output with
defaultResultHandlerand the API-levelresultHandleroption. Response templates belong to the Structure handler. Check default envelopes, failure responses, binary output, and custom handlers. - SQL extensions:
TypeHandlernow usesObjectarguments and return values;AbstractTypeHandler<T>retains generics. Register handlers throughTypeHandlerRegistry.register(...); mapping annotations and thejavaTypeparameter option are removed.
See the Dataway architecture, API, and data migration guide for interface mappings, configuration examples, and migration steps.