Skip to content

Feature sqlbuilder#7

Merged
KARTIKrocks merged 2 commits intomainfrom
feature-sqlbuilder
Feb 25, 2026
Merged

Feature sqlbuilder#7
KARTIKrocks merged 2 commits intomainfrom
feature-sqlbuilder

Conversation

@KARTIKrocks
Copy link
Owner

Added

  • sqlbuilder — New sqlbuilder package: fluent, type-safe SQL query builder with multi-dialect support (PostgreSQL, MySQL, SQLite)
  • sqlbuilderSelect, Insert, Update, Delete builders with chainable API and Build() (string, []any) terminal method
  • sqlbuilder — Dialect support: Postgres (default, $1, $2, ...), MySQL and SQLite (? placeholders) via SetDialect(d) or SelectWith(d, ...) / InsertWith(d, ...) / UpdateWith(d, ...) / DeleteWith(d, ...) constructors
  • sqlbuilder — SELECT: Distinct, Column, Columns, ColumnExpr, From, FromAlias, FromSubquery
  • sqlbuilder — JOIN support: Join, LeftJoin, RightJoin, FullJoin, CrossJoin with parameterized ON clauses
  • sqlbuilder — WHERE conditions: Where, WhereEq, WhereNeq, WhereGt, WhereGte, WhereLt, WhereLte, WhereLike, WhereILike, WhereIn, WhereNotIn, WhereBetween, WhereNull, WhereNotNull, WhereExists, WhereNotExists, WhereOr, WhereInSubquery, WhereNotInSubquery — available on Select, Update, and Delete builders
  • sqlbuilder — Automatic placeholder rebasing: each Where call uses $1-relative numbering, globally rebased at Build() time
  • sqlbuilderGroupBy, Having, OrderBy, OrderByAsc, OrderByDesc, OrderByExpr, Limit, Offset
  • sqlbuilder — Row-level locking: ForUpdate, ForShare, SkipLocked, NoWait
  • sqlbuilder — Set operations: Union, UnionAll, Intersect, Except
  • sqlbuilder — CTEs: With, WithRecursive, WithSelect, WithRecursiveSelect on all builders
  • sqlbuilder — INSERT: Columns, Values, ValueMap, BatchValues, FromSelect
  • sqlbuilder — Upsert: OnConflictDoNothing, OnConflictUpdate, OnConflictUpdateExpr
  • sqlbuilder — UPDATE: Set, SetExpr, SetMap, Increment, Decrement, multi-table From
  • sqlbuilder — DELETE: Using for multi-table deletes
  • sqlbuilderReturning clause on Insert, Update, and Delete builders
  • sqlbuilder — Expression helpers: Raw, RawExpr, Count, CountDistinct, Sum, Avg, Min, Max, Expr.As(alias)
  • sqlbuilder — Request integration: ApplyPagination, ApplySort, ApplyFilters bridge request package types to query conditions
  • sqlbuilderWhen(cond, fn) conditional builder and Clone() deep copy on all builders
  • sqlbuilder — All builders expose Build(), MustBuild(), Query(), and String() terminal methods

@KARTIKrocks KARTIKrocks self-assigned this Feb 25, 2026
@KARTIKrocks KARTIKrocks merged commit cd39e9e into main Feb 25, 2026
3 checks passed
@KARTIKrocks KARTIKrocks deleted the feature-sqlbuilder branch March 5, 2026 05:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant