Commit Graph

39 Commits

Author SHA1 Message Date
end fa4efb38f7 feat(ksuid): add BinExpr, flexible parsers, and expression helpers
Adds ParseStringKSUIDAny, ParseBinaryKSUIDAny, BinaryKSUID.BinExpr, and
ExprStringKSUIDs for portal-compatible KSUID handling at API boundaries.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-29 18:26:17 -07:00
end 689e022e3e feat(count): add QueryCount pagination helpers
Adds CountResult, QueryCount, BuildQueryCountFn, and ReadableTable
alias for Jet pagination total counts, with tests and docs.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-29 18:25:49 -07:00
end 08f8387856 feat(tx): add WithTxValue for transactional return values
WithTxValue runs a callback inside a transaction and returns its result,
with rollback on error. Includes tests and documentation updates.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-29 18:25:08 -07:00
end fbb9c74aab feat(query): add Query, MustQuery, and UpdateOne helpers
Adds scan-into-dest query helpers and update-one-row semantics with
Context variants, tests, and documentation updates.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-29 18:24:29 -07:00
end cc44931ea9 feat(ksuid): add Equal and IsZero for ApplyInterfacePtr
StringKSUID and BinaryKSUID now implement ApplyInterface with nil-nil
equality semantics, enabling ApplyInterfacePtr in patch logic. Adds nil
sentinel vars and tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-29 18:24:07 -07:00
end 0f8e79a890 refactor: use GraphQL string scalar for KSUID transit
Marshal and unmarshal both use the base62 KSUID string, replacing the
legacy JSON object wrapper and aligning gqlgen scalar behavior.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-29 18:03:39 -07:00
end 29b855f2b9 test: fill remaining V1 test coverage
Add JSONB, pointer/filter, MustFetchOne, and dialect logger registration
tests for dbxm and dbxp.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-29 17:51:17 -07:00
end 7647884464 docs: add V1 README, CHANGELOG, and package docs
Expand README with setup and API guidance, add CHANGELOG breaking
section, and refresh package documentation for the V1 API surface.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-29 17:50:47 -07:00
end 63187ee905 fix: harden module lifecycle and debug log setup
Export CurrentDialect(), return setup errors when debug logger is not
registered, and guard DestName logging when the module is uninitialized.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-29 17:50:31 -07:00
end 8d697eda5b feat: add delete, context, and tx helpers
Add Delete/DeleteAffected, context-aware CRUD helpers, WithTx, ContainsCol,
and queryReturning deduplication for returning statements.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-29 17:49:57 -07:00
end 8053aafa6f refactor: use dialect-neutral Jet type aliases
Replace mysql/postgres intersection interfaces with mysql type aliases
per go-jet/jet#555 and generalize Apply/Expr signatures.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-29 17:47:56 -07:00
end a303e025b2 feat: add StringKSUID and BinaryKSUID types
Replace the UUID wrapper with storage-specific KSUID types that share
GraphQL string transit but use distinct SQL Scan/Value encodings.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-29 17:47:41 -07:00
end 984b52d198 refactor: remove unused AutoMigrate, SQLOFunc, JSONB.ToMap
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-29 17:47:04 -07:00
end f9befa1b0a refactor: split dbx package into domain files
Reorganize monolithic dbx.go and utility.go into focused files by
concern, add package doc.go, and gitignore coverage.out.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-29 17:46:54 -07:00
end 14686a83cb move utilities out of db-specific packages
DestName & NormalCols now live in root dbx package utilizing union
interfaces. SoftDelete helper has been dropped.
2026-01-28 11:57:50 -08:00
end 20b5dee18a go mod tidy 2026-01-28 11:22:48 -08:00
end 6ab100cc46 upgrade to go 1.25 & port helpers
Removed ExprID and ExprEnum in favour of generics.
2026-01-28 11:22:06 -08:00
end 78de94c919 config: add Host and Port helpers 2026-01-28 11:17:38 -08:00
end e2e1228712 fix database open failure due to dialect setting lost 2026-01-27 17:23:06 -08:00
end 426ec87607 add BSD 3-Clause license 2026-01-27 15:09:43 -08:00
end 8f3b5118c2 remove LIMIT call from FetchOne helpers 2025-06-12 18:04:37 -07:00
end e20984d2b5 Revert "remove FetchOne helpers"
This reverts commit 88755830e5.
2025-06-12 18:03:56 -07:00
end 88755830e5 remove FetchOne helpers
Doesn't work due to LIMIT return type--always specific to the postgres
and mysql jet packages.
2025-06-12 18:03:09 -07:00
end d5c7926e97 revert InitModuleDB pattern, back to single ModuleDB func 2025-06-12 17:45:55 -07:00
end 32567471e1 refactor with improved developer ux in mind
- Most functions now live directly in the dbx package
- dbxp and dbxm are now ONLY the few functions that cannot be shared
2025-06-12 17:44:44 -07:00
end 18e669101e change DBConfig.Path to URI and add ConnectionString method 2025-06-12 17:43:03 -07:00
end 6129163b84 add SQLOFunc type and update SQLO error messages 2025-06-05 14:21:59 -07:00
end 0b0a23cf55 go mod tidy 2025-06-05 13:53:17 -07:00
end b0672cdf13 simplify subpackage naming 2025-06-04 18:23:34 -07:00
end 7e35ba0f3a add postgresql support 2025-06-04 18:21:30 -07:00
end d773164227 split mysql specific code into separate package 2025-06-04 18:17:39 -07:00
end 757483a574 improve file structure 2025-06-04 18:13:31 -07:00
end 120d0789a0 add message to SQLO database module check 2025-06-03 15:11:56 -07:00
end 8bedc3466f upgrade for latest version of go-toolkit/app 2025-06-03 14:59:25 -07:00
end 2a43af1c3f protect DB object and check module loaded 2025-05-30 16:54:23 -07:00
end 4faae52a10 go mod tidy 2025-05-30 16:32:47 -07:00
end 55cc3ffd83 add utilities, JSONB & UUID types 2025-05-30 16:28:43 -07:00
end a22843f130 implement basic db module 2025-05-30 16:28:28 -07:00
end 08d96ca00f initial commit 2025-05-30 11:20:31 -07:00