Added typed columns for better CREATE SQL support#44
Merged
ez-plugins merged 5 commits intomainfrom Apr 22, 2026
Merged
Conversation
- README.md: remove double blank lines before ## Features, ## Global and Per-Query Configuration, and ## License (MD012) - README.md: add missing trailing newline at end of file (MD047) - AGENTS.md: add blank lines before unordered lists (MD032)
…ateBuilder - Add ColumnType final class with 25 fixed-type constants (TINYINT through 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 existing column(String, String) via ColumnType.toSql() — fully backward compatible - Add ColumnTypeTest: 32 tests covering constants, factories, modifiers, chaining, and CreateBuilder integration
…reference - Replace minimal example with full ColumnType-based table definition - Add ColumnType section: fixed-type constant table, parameterised factory method table, modifier chain table, and custom-type examples - Expand IF NOT EXISTS and composite-PK examples to use ColumnType - Update method reference table to include column(String, ColumnType)
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 / Bool named to avoid shadowing java.lang types
when the package is wildcard-imported
- ColTypesTest: 34 tests covering all classes and modifier chaining
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
- Add spaces to all table separator rows (|---|---| → | --- | --- |) across all 19 docs files to satisfy markdownlint MD060 compact style - Remove orphan duplicate row at end of docs/queries/create.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ColumnType for type-safe column definitions
ColumnTypefinal class with 25 fixed-type constants (TINYINTthroughUUID), 7 parameterised factory methods (varChar,charType,decimal,numeric,binary,varBinary,timestamp), and 4 chainable modifier methods(
notNull,unique,autoIncrement,defaultValue)CreateBuilder.column(String, ColumnType)overload; delegates to theexisting
column(String, String)viaColumnType.toSql(), fully backwardcompatible
ColumnTypeTest: 32 tests covering constants, factories, modifiers,chaining, and
CreateBuilderintegrationPer-type shorthand classes
Each class in the new col package wraps a single
ColumnTypeconstant orfactory method behind a concise name and a uniform
of()/of(params)factory. Developers can use a wildcard import to write:
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.langtypeswhen the package is wildcard-imported
ColTypesTest: 34 tests covering all classes and modifier chaining