Class QueryExecutor
java.lang.Object
com.github.darksoulq.abyssallib.common.database.relational.postgres.QueryExecutor
A PostgreSQL-aware query dispatcher.
This class acts as a factory for table queries and builders, ensuring that
all operations are performed using the latest valid connection from the
associated Database.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionStarts a fluent table schema builder.voidexecuteRaw(String sql) Executes a raw SQL string.Starts a fluent query builder for a specific table.
-
Constructor Details
-
QueryExecutor
Constructs a new QueryExecutor.- Parameters:
database- The parentDatabaseinstance.
-
-
Method Details
-
table
Starts a fluent query builder for a specific table.- Parameters:
name- The table name.- Returns:
- A new
TableQueryinstance.
-
create
Starts a fluent table schema builder.- Parameters:
name- The name of the table to create.- Returns:
- A new
TableBuilderinstance.
-
executeRaw
Executes a raw SQL string. This is typically used for administrative tasks or non-standard queries.- Parameters:
sql- The raw SQL to execute.- Throws:
Exception- If a database access error occurs.
-