Changelog¶
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
v1.14.0 - 2025-09-18¶
Contracts¶
- Added Kindable, Identifiable, and Aliasable contracts; refactored BaseToken.
Types¶
- Introduced enums for Join, Condition, Identifier, ExpressionKind, and Operator.
Tokens¶
- Condition: new Token interface and constructors; Render docs clarified, ready for dialect-aware output.
- Field/Table: stricter validation via resolver.
- Join: added CROSS and NATURAL join support.
Builder¶
- SelectBuilder moved to
builder/selects; constructor renamedNewSelectβNew(β οΈ breaking). - Extended with full join support and chaining for conditions, ordering, and pagination.
Helpers¶
- Simplified
ResolveExpression; extendedResolveCondition; newIsValidSlicefor operator/value rules.
Docs & Tests¶
- Added
builder/selects/README.mdwith strict field rules and modern usage. - Expanded examples, improved diagnostics.
- 100% coverage for new/changed tokens and builder flows.
v1.13.0 - 2025-08-26¶
Database (builder/select)¶
- Added full clause support:
- Conditions:
Where,And,Or(reset, append, normalize with AND, ignore empty). - Grouping:
GroupBy,ThenGroupBy(reset/append, ignore empty, rendered between WHERE and HAVING). - Having:
Having,AndHaving,OrHaving(reset/append, normalize with AND, rendered after GROUP BY). - Ordering:
OrderBy,ThenOrderBy(reset/append, ignore empty, rendered after GROUP BY/HAVING).
- Conditions:
- Enhanced diagnostics & reporting:
- Invalid fields produce consistent
βοΈ Field("<expr>"): input type unsupported: <type>errors. Debug()andString()improved with β /βοΈ status markers.Build()aggregates invalid fields, detects nil receiver and missing source, with clear β messages.
- Invalid fields produce consistent
Database (contract)¶
- Introduced BaseToken contract (
db/contract/base_token.go):- Provides core identity and validation for all tokens
- Methods:
Input(),Expr(),Alias(),IsAliased(),IsValid() - Ensures
Field,Table, and future tokens expose consistent state
- Added runnable example (
ExampleBaseToken) inexample_test.go - Updated
doc.goto include BaseToken in contract overview with normalized style - Updated
README.md:- Added BaseToken section with purpose, methods, and usage
- Streamlined layout, removed redundancy
- Extended philosophy with Consistency principle: all tokens share BaseToken
- Extended Errorable contract with
SetError(err error):- Allows tokens/builders to mark themselves as errored after construction
- Implemented in
FieldandTabletokens - Updated
doc.go,README.md, andexample_test.goto demonstrate usage
Database (token/table)¶
- Introduced Table token to represent SQL sources in builders:
- Provides constructors and helpers to define tables, aliases, and raw inputs.
- Supports consistent rendering across dialects.
- Ensures validation of invalid/empty inputs with clear error reporting.
- Added unit tests covering constructors, methods, and edge cases with 100% coverage.
- Added doc.go with package overview and usage guidelines.
- Added example_test.go with runnable examples.
- Added README.md documenting purpose, design, and usage of token.Table.
Database (token/field)¶
- Struct
Fieldis now hidden (fieldunexported); only theTokeninterface is public. - Constructors (
New,NewWithTable) returnTokeninstead of *field, ensuring encapsulation. Clone()updated to returnToken.-
Example tests aligned:
- Functions renamed from ExampleField_ β ExampleToken_.
- Debug/String outputs updated to lowercase
field(...). - Clone example simplified (no pointer comparison).
-
Refactored Field into dedicated subpackage
db/token/field:- Preserved API (
field.New(...)) and contract implementations unchanged. - Updated
builder/select.goandselect_test.goto import from the new path. - Adjusted Dockerfile-documentation to copy
db/token/field/README.md. - Normalized structure for consistency with
token/table.
- Preserved API (
- Introduced Token contract as a scaffold to decompose Field identity into auditable pieces:
- Aggregates
BaseToken,Clonable,Debuggable,Errorable,Rawable,Renderable, andStringable. - Defines ownership methods:
HasOwner(),Owner(), andSetOwner(). - Intention: sort every identity aspect (expr, alias, owner, validity, raw state) into dedicated contracts for auditability.
- β οΈ Currently only the contract and documentation are provided; implementation is staged for later commits.
- Aggregates
- Documentation updates:
doc.go: addedHasOwner,Owner,SetOwnerunder Field Behavior.example_test.go: added placeholderExampleField_owner(commented out until implemented).README.md: new Contracts and Auditability section in Developer Guide.
- Root-level documentation:
- Added
db/token/README.mdwith purpose and subpackage table (field, table). - Added
db/token/doc.gowith GoDoc overview, principles, subpackages, and roadmap.
- Added
Common (extension/integer)¶
- Introduced integer parser:
ParseFrom(any)converts input safely to int, rejects invalid types.IntegerOrshortcut with defaults.- Consistent with
boolean,float, anddecimalparsers.
Tests & Docs¶
- Comprehensive unit tests across Database and Common ensuring 100% coverage.
- README.md, doc.go, and example_test.go updated with Conditions, Grouping, Having, Ordering, and Integer parser sections.
- Added runnable examples in
example_test.godemonstrating new Having clause.
v1.12.0 - 2025-08-22¶
Highlights¶
- Parser Shortcuts: Added
Orvariants (BooleanOr,NumberOr,FloatOr,DecimalOr,DateOr) to allow explicit fallback values. - Extension Documentation: Each extension subpackage (
boolean,date,decimal,float,number,object,collection) now ships withREADME.md,doc.go, andexample_test.go. - Object Helpers: Normalized and moved from
common/objectβcommon/extension/object. - Deprecations:
BoolToStrhas been renamed toBoolToStringand moved intocommon/extension/boolean.- Existing usages of
BoolToStrwill continue to work but are discouraged.
Documentation¶
- Added root-level
doc.goforcommondescribing purpose and structure. - Added
README.mdforcommon, linking subpackageserrorsandextension. - Added package-level READMEs and examples across all
common/extensionsubpackages. - Dockerfile updated to copy package-level READMEs into site docs.
- Navigation updated with alphabetized extension packages.
Internal¶
- Unified test coverage for all parsing helpers and
Orfallbacks. - Refactored Dockerfile to preserve base image but copy documentation automatically.
- Clarified supported input formats in
date.ParseAndFormatexamples.
v1.11.0 - 2025-08-17¶
Highlights¶
- New parsing faΓ§ade: one-line helpers for
Boolean,Float,Decimal, andDate. - Deterministic date cleaning:
CleanAndParse,CleanAndParseAsString, strictYYYYMMDDprefix path, and 100% tests. - Boolean parser++: extended tokens (
on/off,y/n,t/f) and explicitnilrejection. - SQL Builder/Token overhaul:
Column β Field,FieldCollection, deterministicNewFieldinputs, and Postgres/Base dialects with tests.
v1.10.0 - 2025-08-07¶
- dce6cf7 feat(object): enhance Exists, GetValue, SetValue with flexible types; add extensive tests; update docs (Isidro Lopez)
v1.9.0 - 2025-08-07¶
Added¶
- 09e6632 feat(common/math): add float and decimal parsing packages and update documentation (Isidro Lopez)
v1.8.4 - 2025-08-07¶
Added¶
- bb3af79 docs(common/number): add ParseFrom utility details with rounding flag and float string parsing (Isidro Lopez)
- 7c6982e feat(common/number): enhance ParseFrom with float string parsing and rounding flag (Isidro Lopez)
- 4b204c3 feat(number): extend ParseFrom to support bool values (Isidro Lopez)
v1.8.3 - 2025-08-06¶
Added¶
- 55d24c3 feat(common): add generic object utilities and enhanced error types (Isidro Lopez)
v1.8.2¶
Added¶
- 4cd3d28 feat(project): add ProcessStageError, ProcessStage guide, deployment automation, and docs table update ( Isidro Lopez)
v1.8.1¶
Added¶
- 0b32dbd feat(entiqon): return to monorepo technique (Isidro Lopez)
[v1.8.0] - 2025-08-02¶
Added¶
- Modularization of
dbpackage as a standalone Go module:github.com/entiqon/db. - Updated import paths from
github.com/entiqon/entiqon/...togithub.com/entiqon/db/.... - Added initial test coverage and CI integration for
dbmodule. - Future modules like
corewill be added modularly following this pattern. - Icon and documentation support for:
- Category 1: Entiqon Sharicon (orange shared folder)
- Category 2: Entiqon Corecon (green gear)
- Category 3: Entiqon Datacon (green DB cylinder)
- Category 4: Entiqon Commicon (teal antenna)
- Category 5: Entiqon Toolicon (red wrench & hammer)
Note: This is a breaking change; downstream users must update import paths accordingly.
Codename: Atlas
[v1.7.0] - 2025-06-09¶
- refactor(token): rename HasError β IsErrored(), SetErrorWith β SetError()
- feat(token): add GetError(), SetError(), IsErrored() (Errorable contract)
- feat(token): introduce Kind enum and Kindable interface
- feat(token): add SetKind(), GetKind() to BaseToken
- chore(token): update BaseToken.String() to use Kindable & Errorable
- docs: add base_token.md and update token.md to document new contracts
- test: add tests for Errorable and Kindable methods (nil-safe coverage)
Codename: Forge
[v1.6.0] - 2025-05-25¶
Added¶
- Support for aliasable SQL expressions with optional table qualification
- Introduces reusable token abstraction for handling elements like
table.column AS alias - Provides helper methods:
Raw(),String(),WithTable(),IsValid(), etc.
Notes¶
This version enables standardized handling of SQL identifiers across the builder, including aliases and table scoping.
It's the first practical application of the previously introduced AliasableToken.
Codename: Keystone
[v1.5.0] β 2025-05-24¶
β¨ Features¶
StageToken: Standardized clause tagging for error validation- Public Dialect API: Enables custom dialect implementations
- Enhanced builder error tagging with
StageToken
π οΈ Refactors¶
- Normalized ParamBinder and Condition to use injected Dialect
- All builders updated to unified token/dialect handling strategy
- Centralized placeholder resolution across WHERE, SET, VALUES
β Test Coverage¶
- builder: 94.4%
- driver: 100.0%
- core/builder: 95.5%
- bind, test packages: 100%
- error/token: >75%
π Docs¶
- Updated all builder guides
- Documented new dialect interface and StageToken strategy
[v1.4.0] - 2025-05-22¶
β¨ Added¶
NewCondition: semantic-aware condition constructor with support for:- Inline and placeholder syntax (e.g.,
"status = active","status = ?"+ value) - Type inference (
int,bool,float64,string) - Operator support:
=,!=,<>,<,>,<=,>=,IN,NOT IN,BETWEEN,LIKE,NOT LIKE
- Inline and placeholder syntax (e.g.,
ParamBinder: unified argument binding for dialects (?,$N,:field)condition_helpers.go: includesInferLiteralType,ParsePlaceholderPattern,AllSameType, andContainsUnboundPlaceholder
π§± Builders Implemented¶
SelectBuilderInsertBuilderUpdateBuilderDeleteBuilderUpsertBuilder(withON CONFLICT,DO UPDATE, andDO NOTHING)
β Validation¶
- All builders enforce:
- Table presence
- Column count/value alignment
- Alias rejection in INSERT/UPSERT
- Invalid or unsupported condition rejection via
AddStageError(...)
UpsertBuildersupportsRETURNINGonly if the dialect allows it (SupportsReturning())
π§ͺ Test Coverage¶
- Achieved 100% coverage on:
select.go,insert.go,update.go,delete.go,upsert.gocondition_renderer.go,condition_helpers.go,param_binder.go
[v1.3.0] - 2025-05-19¶
β¨ Added¶
update_builder.md: merged and normalized UpdateBuilder documentation- Introduced
Dialect Guidewith version-tagged interfaces and test philosophy - Added
Principles & Best Practicessection to README.md - Linked all finalized builder docs under
docs/developer/builder/ - Version tags added to all builder docs (
Since v1.2.0) - Explicit
Method ReferenceandClause Orderingsections added to guides
π§ͺ Coverage¶
- Achieved 100.0% test coverage across all:
- Builder methods
- Token resolvers
- Dialect interfaces (base, postgres, resolver)
- Deprecated methods (e.g.,
WithDialect(...)) remain tested until removal - All helper methods, even unused, are now covered and documented
π§ Philosophy¶
- Injected sarcastic validation quote into dialect guide:
βEven if necessary, tests will be tested.β
- All docs and builders adhere to strict validation, quoting, and fluent chaining principles
[v1.2.0] - 2025-05-18¶
π Documentation¶
- Moved all builder documentation into
/docs/builder/ - Added centralized
/docs/index.mdwith badges, overview, and links - Integrated GitHub Pages deployment via Actions
- Updated README to offload examples and link each builder spec
π Builders¶
- Finalized
UpsertBuilderwith clause-order enforcement - Added
BuildInsertOnly()toInsertBuilderfor better delegation - 100% test coverage including all validation branches and dialect fallback
- Strict enforcement of alias rules in
UpdateBuilderandUpsertBuilder
βοΈ CI/CD¶
- Introduced
docs.ymlGitHub Action to auto-deploy docs on push tomain - Pages deploy pipeline ensures live site reflects every change
Entiqon is now fully documented and auto-published, with hardened query building and consistent structure across all SQL operations.
[v1.1.0] - 2025-05-17¶
β¨ Added¶
- Introduced dialect-aware escaping via
WithDialect(...)in all builders -
Implemented
PostgresEnginewith support for:- Escaping table and column identifiers
- Escaping conflict and returning fields in UPSERT
- Exposed
Dialect Engineinterface for future extensibility
π§ Refactored¶
- Unified condition handling via
token.ConditionwithSet,IsValid,AppendCondition - Applied shared
NewCondition(...)constructor across all builders - Updated
Select,Insert,Update,Delete, andUpsertto support dialect injection - Improved
UpsertBuilderto delegate properly and inject dialect intoInsertBuilder
π Documentation¶
-
Updated README with:
- Dialect usage example
- New βDialect Supportβ section
- Go module version badge
Entiqon now provides a consistent, safe foundation for dialect-specific SQL generation β ready for PostgreSQL, and future engines.
[v1.0.0] - 2025-05-16¶
Added¶
SelectBuilderupgraded to support argument binding and structured condition handling- Consistent
Build() (string, []any, error)signature across all builders - Enhanced `ConditionToken