Implementation:APIJSON APIJSON Demo DemoSQLExecutor BigData
| Knowledge Sources | |
|---|---|
| Domains | Database, Connection_Pooling |
| Last Updated | 2026-10-14 00:00 GMT |
Overview
Concrete tool for executing SQL with Spring-managed connection pool adaptation in the APIJSON BigData server variant.
Description
The DemoSQLExecutor class (BigData variant) extends APIJSONSQLExecutor<Long> and overrides getConnection to obtain JDBC connections from the Spring-managed DataSource bean rather than from static configuration. It caches connections per datasource-database key in connectionMap and delegates to super.getConnection for transaction handling.
Usage
Use this class when the BigData APIJSON server needs to execute SQL against a connection pool-backed datasource.
Code Reference
Source Location
- Repository: APIJSON_APIJSON_Demo
- File: APIJSON-Java-Server/APIJSONBoot-BigData/src/main/java/apijson/demo/DemoSQLExecutor.java
- Lines: 1-86
Signature
public class DemoSQLExecutor extends APIJSONSQLExecutor<Long> {
@Override
public Connection getConnection(SQLConfig config) throws Exception;
}
Import
import apijson.demo.DemoSQLExecutor;
I/O Contract
See Implementation:APIJSON_APIJSON_Demo_DemoSQLExecutor for the I/O contract; the BigData variant follows the same pattern with Spring bean lookup.
Usage Examples
See Implementation:APIJSON_APIJSON_Demo_DemoSQLExecutor usage examples.