Class DDLProcessor
java.lang.Object
io.github.blyznytsiaorg.bibernate.ddl.DDLProcessor
The DDLProcessor class is responsible for processing Data Definition Language (DDL) queries
to create database schema elements.
- Since:
- 1.0
- Author:
- Blyzhnytsia Team
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorDescriptionDDLProcessor
(DDLQueryCreator ddlQueryCreator, BibernateDataSource dataSource) -
Method Summary
Modifier and TypeMethodDescriptionprivate void
executeQuery
(List<String> queries) Executes a batch of SQL queries against the database using the provided connection.void
Processes the creation of database properties by executing the generated DDL queries.
-
Field Details
-
ddlQueryCreator
-
dataSource
-
-
Constructor Details
-
DDLProcessor
-
-
Method Details
-
processCreateProperty
public void processCreateProperty()Processes the creation of database properties by executing the generated DDL queries.Retrieves the DDL metadata from the DDLQueryCreator and executes each set of DDL queries using the DataSource. Queries are executed as batches for optimization and atomicity.
-
executeQuery
Executes a batch of SQL queries against the database using the provided connection.This method adds each query to a batch using the Statement object obtained from the connection, then executes the batch of queries.
- Parameters:
queries
- the list of SQL queries to execute as a batch- Throws:
BibernateGeneralException
- if an SQL exception occurs while executing the batch operation
-