PostgreSQL dialect with ILIKE and RETURNING support
- Add
PostgreSqlDialectextendingAbstractSqlDialect:
double-quote identifier quoting,supportsReturning()=true,
appendConditionFragmentoverride for ILIKE/NOT ILIKE - Register
SqlDialect.POSTGRESQLconstant inSqlDialectinterface - Add ILIKE and NOT_ILIKE to Operator enum (PostgreSQL-only operators)
- Add
supportsReturning()hook toAbstractSqlDialect;
renderDelete()now appends RETURNING clause when the hook returns true
RETURNING clause support to DML builders
- Add
returningColumnsfield + getter/setter toQuery DeleteBuilder.returning(String... columns): passed throughQuery
toAbstractSqlDialect.renderDelete()viasupportsReturning()hookInsertBuilder.returning(String... columns): appended inline to SQLUpdateBuilder.returning(String... columns): appended inline to SQL
whereILike / orWhereILike builder methods
QueryBuilder.whereILike(column, value): ILIKE condition with AND connectorQueryBuilder.orWhereILike(column, value): ILIKE condition with OR connectorSelectBuilder.whereILike(column, value): ILIKE condition with AND connector
(follows existingwhereLikepattern; noorWhere* inSelectBuilder)
ColumnType for type-safe column definitions
- Add
ColumnTypefinal class with 25 fixed-type constants (TINYINTthrough
UUID), 7 parameterised factory methods (varChar,charType,decimal,
numeric,binary,varBinary,timestamp), and 4 chainable modifier methods
(notNull,unique,autoIncrement,defaultValue) - Add
CreateBuilder.column(String, ColumnType)overload; delegates to the
existingcolumn(String, String)viaColumnType.toSql(), fully backward
compatible - Add
ColumnTypeTest: 32 tests covering constants, factories, modifiers,
chaining, andCreateBuilderintegration
Per-type shorthand classes
Each class in the new col package wraps a single ColumnType constant or
factory method behind a concise name and a uniform of() / of(params)
factory. Developers can use a wildcard import to write:
import com.github.ezframework.javaquerybuilder.query.builder.col.*;
.column("id", Int.of().notNull().autoIncrement())
.column("username", VarChar.of(64).notNull().unique())
.column("price", Decimal.of(10, 2))
.column("created_at", Timestamp.of())instead of prefixing every type with ColumnType.
Classes added (31 total):
Fixed types: TinyInt, SmallInt, Int, BigInt, SqlFloat, SqlDouble,
Real, Bool, Text, TinyText, MediumText, LongText, Clob,
Blob, TinyBlob, MediumBlob, LongBlob, Date, Time, DateTime,
Json, Serial, BigSerial, Uuid
Parameterised types: Timestamp (overloaded of() / of(int)),
VarChar, Char, Decimal, Numeric, Binary, VarBinary
SqlFloat/SqlDouble/Boolnamed to avoid shadowingjava.langtypes
when the package is wildcard-importedColTypesTest: 34 tests covering all classes and modifier chaining