Package com.invirgance.convirgance.jdbc.sql
package com.invirgance.convirgance.jdbc.sql
SQL statement builder framework for constructing SQL queries.
This package provides a fluent API for building type-safe SQL statements without writing raw SQL.
It follows a compositional builder pattern where SQL components are represented as Java objects
that can be combined into complete SQL statements.
Key components:
- Operator Classes: And, Not and Or Boolean statements.
- Statement Classes: SelectStatement and other complete SQL statements
- Clause Classes: FromStatement, WhereStatement for SQL clauses
- Expression Classes: ColumnExpressionStatement, BindExpressionStatement
- Comparison Classes: ComparisonOperatorStatement, IsNullComparisonStatement
- SQLRenderer: Core engine for generating formatted SQL text
Basic example:
SelectStatement query = database
.select()
.column(customerTable.getColumn("name"))
.from(customerTable)
.where()
.equals(customerTable.getColumn("status"), "active")
.done();
String sql = query.toString();
-
ClassDescriptionThis is used to create an expression with named bindings in a SQL query.A named parameter that can be used when creating SQL queries.BooleanAndStatement<P extends WhereStatement>Creates a logical AND grouping in SQL, combining multiple conditions that all must be true.BooleanNotStatement<P extends WhereStatement>Creates a logical NOT operator in SQL, negating the conditions it contains.BooleanOrStatement<P extends WhereStatement>Creates a logical OR grouping in SQL.Represents a database column in SQL queries, with optional column aliasing (naming).Different comparison operators.Represents a binary comparison operation in SQL with a left expression, comparison operator, and right expression.Creates the FROM clause for a SQL query with the provided
TabularStructure.Represents the "IS NOT NULL" expression, for creating comparisons on expressions.Represents the SQL "IS NULL" comparison operator in conditions.Enumerations for SQL keywords.Represents a literal value within an SQL expression.Represents the order key words for the SQL ORDER BY clauses.Creates an OrderByStatement, this is used to add an order by clause.Represents a SQL SELECT statement builder.Core SQL generation engine that renders SQL statements into properly formatted SQL strings.Core interface for all SQL statement components.WhereStatement<P extends SQLStatement>