Hanzo Dev
28b441dca8
merge: integrate held feature work onto main
2026-07-22 03:01:50 -07:00
Hanzo Dev
936ee38878
merge held work: xorm provenance notice + Hanzo README branding
...
# Conflicts:
# README.md
2026-07-22 02:44:39 -07:00
Hanzo AI
a0df5e4e67
fix(engine): pass err to the dialect-infer Errorf (vet: missing %v arg)
v1.4.4
2026-07-19 20:24:30 -07:00
Hanzo AI
0302fe7595
build(sqlite): bump hanzoai/sqlite v0.3.1 -> v0.3.2 — modernc out of the graph
2026-07-19 20:23:57 -07:00
5f67d49ab3
feat(tests): migrate SQLite driver to github.com/hanzoai/sqlite ( #2 )
...
Swap test-only blank driver imports (modernc.org/sqlite, mattn/go-sqlite3)
to _ "github.com/hanzoai/sqlite", which registers the "sqlite" database/sql
driver name under both cgo and pure-Go builds. Dedupe the two files that
imported both drivers. dialects/dialect.go already aliases "sqlite" to the
sqlite3 dialect, so no dialect changes are needed. Non-test code is
driver-agnostic. go build ./... green.
Co-authored-by: hanzo-dev <dev@hanzo.ai >
2026-07-17 23:17:52 -07:00
Hanzo Dev
cf328abfb6
re-fork from upstream xorm.io/xorm v1.4.1 (421cdc36)
...
Replace the working tree with the exact contents of upstream
xorm.io/xorm v1.4.1, applying ONLY:
- import-path rename xorm.io/xorm -> github.com/hanzoai/xorm
- import-path rename xorm.io/builder -> github.com/hanzoai/builder
- module line -> github.com/hanzoai/builder consumer
- NOTICE provenance (Hanzo AI + upstream Xorm Authors, BSD-3-Clause)
Non-test .go is byte-identical to upstream after normalizing the import
paths back, so schema Sync (columnTypesMatch/columnDefaultsMatch), the
PostgreSQL GetColumns introspection, and the context hook Ctx writeback
match upstream exactly. The prior fork content predated v1.4.1 and is
superseded; published as immutable v1.4.2.
v1.4.3
2026-07-17 18:33:52 -07:00
Hanzo Dev
f6e05873e5
chore(notice): add xorm provenance and deviations
2026-07-13 16:04:50 -07:00
Hanzo Dev
f19cd4d393
merge: de-gitea scrub → main
2026-07-13 12:13:07 -07:00
Hanzo Dev
bc3d10a339
chore: de-gitea — scrub branding/docs, keep legal+provider
...
Repoint our own branding/docs/config away from gitea.com to Hanzo hosts;
leave genuine upstream history, factual credits, functional deps intact.
- .changelog.yml: target hanzoai/xorm via github service (keep github|gitea
as a provider option; drop stale upstream-default comments)
- .gitea/workflows/release-tag.yml: fetch release-action from git.hanzo.ai
(keep the .gitea/workflows path — Gitea-Actions convention our runner uses)
- Makefile: neutral test DB name; drop stale "Gitea requires Go" message
- CONTRIBUTING.md: point contributors at github.com/hanzoai/xorm + our id
- README.md / README_CN.md: relative cross-language + CONTRIBUTING links,
build badge to git.hanzo.ai
Kept (do not touch): upstream release history in CHANGELOG.md and the
upstream issue reference in rows.go (honest pre-fork record); factual
"Cases" Gitea credit; gitea.com/xorm/sqlfiddle in go.sum (transitive dep of
hanzoai/builder; go mod tidy retains it); gitee.com/travelliu/dm (gitEE, not
gitEA — real compiled driver).
2026-07-13 11:58:35 -07:00
Hanzo Dev
03d8045963
deps: drop mattn/go-sqlite3 -> hanzoai/csqlite; modernc sqlite v1.48.0
...
Test sqlite driver was the only mattn user; swap the 4 blank imports to
hanzoai/csqlite (drop-in, registers driver name sqlite3). Bump
modernc.org/sqlite v1.20.4 -> v1.48.0 (go1.25, no mattn require) to drop
the transitive mattn ghost from the module graph. grep mattn go.mod = 0,
go list -deps mattn = 0. core/internal.statements/migrate/tests green.
v1.4.1
2026-07-12 21:17:27 -07:00
zeekay and Claude Opus 4.8
01911ebce2
fix(deps): repair vanished pins / go.sum drift ( tidy) + build green
...
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com >
v1.4.0
2026-06-30 14:36:29 -07:00
zeekay
fed86ab96c
Merge branch 'v1'
2026-06-30 14:33:34 -07:00
z
eda7e6e8e0
docs(brand): add hero banner
2026-06-28 20:26:00 -07:00
z
21aac3b374
chore(brand): dynamic hero banner
2026-06-28 20:25:59 -07:00
Antje Worring and Claude Opus 4.8
8bd8844b8b
docs: tidy LLM.md indexes; CLAUDE.md -> LLM.md symlink convention
...
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com >
2026-06-17 09:40:22 -07:00
Hanzo AI
3c5b4ece9d
deps: bump Go to 1.26.4 across go.mod, Dockerfiles, GH Actions
...
Workspace-wide sync. luxfi/node already shipped on 1.26.4 in v1.30.6
(commit 121aca1fa9); this is the cross-repo catch-up.
2026-06-07 12:13:12 -07:00
Antje Worring and Claude Opus 4.8
14f28821ce
Add Claude Code project docs (CLAUDE.md, LLM.md)
...
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-05-31 21:44:05 -07:00
Hanzo AI
989296554b
go.mod: bump go directive to 1.26.3 (security advisory)
2026-05-12 21:27:15 -07:00
Hanzo AI
c38d16c780
chore: gitignore .DS_Store
2026-04-17 16:58:50 -07:00
Hanzo AI
ea3aed14f3
fork: xorm.io/xorm → github.com/hanzoai/xorm
v1.1.6
2026-04-06 20:45:59 -07:00
Lunny Xiao
ab3ffa8fa5
Fix bug when invoking session in the after load ( #2569 )
...
Fix #2511
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2569
2026-02-09 01:39:56 +00:00
Lunny Xiao
a5e639c934
Add more tests ( #2570 )
...
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2570
2026-02-09 01:19:26 +00:00
Lunny Xiao
1b6b76c819
Fix postgres placeholder replace bug ( #2566 )
...
Fix #2483
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2566
2026-02-09 00:48:31 +00:00
Lunny Xiao
bcc3b0a2f6
Fix noautocond conflict with unscoped ( #2559 )
...
Replace #2418
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2559
2026-02-08 19:37:14 +00:00
Lunny Xiao
2c18b2e8e0
Improve time.Time alias ( #2568 )
...
Resolve #2500
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2568
2026-02-08 18:33:47 +00:00
Lunny Xiao
cda399819b
Fix queryinterface ( #2562 )
...
Fix #2543
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2562
2026-02-08 18:08:13 +00:00
Lunny Xiao
cb78962e01
Fix auto time fields during transactional inserts/updates ( #2567 )
...
This PR fixes #2521 where `created`/`updated` (and version) fields were not populated on beans when inserting/updating inside a transaction. The fix applies auto-time/version setters immediately after insert/update, rather than deferring them to `afterClosures`, and adds a transaction test to ensure the fields are set before commit/rollback. Minor formatting cleanup included.
Since `session.afterClosures` will only be invoked after the transaction succeed. so that the time will not be set when insert invoking inside a transaction.
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2567
2026-02-08 18:00:49 +00:00
Lunny Xiao
9b89e3ca94
Fix bug after was not cleaned if execution failed ( #2560 )
...
Fix #2546
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2560
2026-02-08 17:53:41 +00:00
Lunny Xiao
90107791a5
Fix bug when invoking buildAfterProcessors ( #2563 )
...
Fix #2547
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2563
2026-02-08 07:33:58 +00:00
Lunny Xiao
8675df8f22
Fix created time could not be updated ( #2564 )
...
Fix #2523
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2564
2026-02-08 07:07:28 +00:00
Lunny Xiao
21dba2ce4c
Fix legacy select not updated ( #2561 )
...
Fix #2548
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2561
2026-02-08 06:21:50 +00:00
Lunny Xiao
f0ba27252e
Support select for update of postgres ( #2557 )
...
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2557
2026-02-08 03:07:57 +00:00
王忠强 and Lunny Xiao
4375e5c14d
Add a new GetOrError method that returns an error when the record does not exist. ( #2366 )
...
Resolve https://gitea.com/xorm/xorm/issues/2328#issue-220740
---------
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2366
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com >
Co-authored-by: 王忠强 <thisky@qq.com >
Co-committed-by: 王忠强 <thisky@qq.com >
2026-02-08 01:20:20 +00:00
Lunny Xiao
8f73fbda6b
Fix distinct count bug ( #2555 )
...
Replace #2402
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2555
2026-02-08 01:17:16 +00:00
dianbanjiu and Lunny Xiao
b1ac70c257
Add support for parsing MySQL unsigned Decimal types. ( #2513 )
...
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2513
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com >
Co-authored-by: dianbanjiu <dianbanjiu@gmail.com >
Co-committed-by: dianbanjiu <dianbanjiu@gmail.com >
2026-02-08 01:09:46 +00:00
Lunny Xiao
e23a7b279a
Fix get bug missed deleted ( #2553 )
...
Fix #2456
Replace #2457
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2553
2026-02-08 01:04:13 +00:00
hsfish and Lunny Xiao
8667e5ab37
Corrected a bug where statement GenExistSQL did not append the Alias when only the table name was present and no RefTable was specified. ( #2505 )
...
Corrected a bug where statement GenExistSQL did not append the Alias when only the table name was present and no RefTable was specified.
---------
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2505
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com >
Co-authored-by: hsfish <hsfishli@geesunn.com >
Co-committed-by: hsfish <hsfishli@geesunn.com >
2026-02-08 00:51:42 +00:00
Lunny Xiao
1aa5e9bc57
Optimize find and count ( #2552 )
...
replace #2467
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2552
2026-02-08 00:14:29 +00:00
fanshengshuai and Lunny Xiao
b1ecee64e0
修复 pq 数据表中 bigint 识别错误 ( #2503 )
...
bigint 应该是 Int64 类型
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2503
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com >
Co-authored-by: fanshengshuai <fanshengshuai@noreply.gitea.com >
Co-committed-by: fanshengshuai <fanshengshuai@noreply.gitea.com >
2026-02-07 23:56:22 +00:00
Lunny Xiao
25b614c5db
use golang ci lint v1 ( #2551 )
...
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2551
2026-02-07 23:53:33 +00:00
Lunny Xiao
c393929a04
Add lint and fix code ( #2549 )
...
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2549
2026-02-07 18:40:04 +00:00
Jinhan He and Lunny Xiao
3ed89200cd
fix(asDBCond): check string when driver.Valuer return string instead of pointer ( #2541 )
...
Description:
the bug is due to `driver.Valuer()` return a non-pointer type value, no check this value and return true directly. [decimal](https://github.com/shopspring/decimal ) is a widely used type in most business scenarios, so I think it's necessary to compatible with the [decimal](https://github.com/shopspring/decimal )
What's changes:
- check string value
- be compatible with [decimal](https://github.com/shopspring/decimal )
close #2411
Test Result:
`
=== RUN TestColumnsStringGeneration
--- PASS: TestColumnsStringGeneration (0.00s)
=== RUN TestConvertSQLOrArgs
--- PASS: TestConvertSQLOrArgs (0.00s)
=== RUN TestAsDbCondWhenFieldValueIsDriverValuer
--- PASS: TestAsDbCondWhenFieldValueIsDriverValuer (0.00s)
PASS
`
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2541
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com >
Co-authored-by: Jinhan He <hjh497804227@gmail.com >
Co-committed-by: Jinhan He <hjh497804227@gmail.com >
2025-10-19 18:30:08 +00:00
Jinhan He and Lunny Xiao
f3dc8cc547
fix(IsStructZero): will panic if check primitive ptr is zero ( #2539 )
...
Description:
When use the `Kind()`, it will return a ptr kind even if the value is primitive pointer (such as `*int` `*uint`, etc.). Therefore, we need to use `Elem()` to get the actual kind to check again.
What's change:
1. add unit test to check the case of no zero
2. remove `fallthrough` and check the primitive pointer
close #2431
Test Result
`
=== RUN TestZero
=== RUN TestZero/0
--- PASS: TestZero/0 (0.00s)
=== RUN TestZero/0#01
--- PASS: TestZero/0#01 (0.00s)
=== RUN TestZero/0#02
--- PASS: TestZero/0#02 (0.00s)
=== RUN TestZero/0#03
--- PASS: TestZero/0#03 (0.00s)
=== RUN TestZero/0#04
--- PASS: TestZero/0#04 (0.00s)
=== RUN TestZero/0x0
--- PASS: TestZero/0x0 (0.00s)
=== RUN TestZero/0x0#01
--- PASS: TestZero/0x0#01 (0.00s)
=== RUN TestZero/0x0#02
--- PASS: TestZero/0x0#02 (0.00s)
=== RUN TestZero/0x0#03
--- PASS: TestZero/0x0#03 (0.00s)
=== RUN TestZero/0x0#04
--- PASS: TestZero/0x0#04 (0.00s)
=== RUN TestZero/0#05
--- PASS: TestZero/0#05 (0.00s)
=== RUN TestZero/0#06
--- PASS: TestZero/0#06 (0.00s)
=== RUN TestZero/<nil>
--- PASS: TestZero/<nil> (0.00s)
=== RUN TestZero/time.Date(1,_time.January,_1,_0,_0,_0,_0,_time.UTC)
--- PASS: TestZero/time.Date(1,_time.January,_1,_0,_0,_0,_0,_time.UTC) (0.00s)
=== RUN TestZero/time.Date(1,_time.January,_1,_0,_0,_0,_0,_time.UTC)#01
--- PASS: TestZero/time.Date(1,_time.January,_1,_0,_0,_0,_0,_time.UTC)#01 (0.00s)
=== RUN TestZero/<nil>#01
--- PASS: TestZero/<nil>#01 (0.00s)
=== RUN TestZero/utils.ZeroStruct{}
--- PASS: TestZero/utils.ZeroStruct{} (0.00s)
=== RUN TestZero/&utils.ZeroStruct{}
--- PASS: TestZero/&utils.ZeroStruct{} (0.00s)
--- PASS: TestZero (0.00s)
=== RUN TestNoZero
=== RUN TestNoZero/1
--- PASS: TestNoZero/1 (0.00s)
=== RUN TestNoZero/1#01
--- PASS: TestNoZero/1#01 (0.00s)
=== RUN TestNoZero/1#02
--- PASS: TestNoZero/1#02 (0.00s)
=== RUN TestNoZero/1#03
--- PASS: TestNoZero/1#03 (0.00s)
=== RUN TestNoZero/1#04
--- PASS: TestNoZero/1#04 (0.00s)
=== RUN TestNoZero/0x1
--- PASS: TestNoZero/0x1 (0.00s)
=== RUN TestNoZero/0x1#01
--- PASS: TestNoZero/0x1#01 (0.00s)
=== RUN TestNoZero/0x1#02
--- PASS: TestNoZero/0x1#02 (0.00s)
=== RUN TestNoZero/0x1#03
--- PASS: TestNoZero/0x1#03 (0.00s)
=== RUN TestNoZero/0x1#04
--- PASS: TestNoZero/0x1#04 (0.00s)
=== RUN TestNoZero/1#05
--- PASS: TestNoZero/1#05 (0.00s)
=== RUN TestNoZero/1#06
--- PASS: TestNoZero/1#06 (0.00s)
=== RUN TestNoZero/time.Date(2025,_time.October,_18,_16,_46,_52,_216439900,_time.Local)
--- PASS: TestNoZero/time.Date(2025,_time.October,_18,_16,_46,_52,_216439900,_time.Local) (0.00s)
=== RUN TestNoZero/time.Date(2025,_time.October,_18,_16,_46,_52,_216439900,_time.Local)#01
--- PASS: TestNoZero/time.Date(2025,_time.October,_18,_16,_46,_52,_216439900,_time.Local)#01 (0.00s)
=== RUN TestNoZero/&utils.NonZeroStruct{PrimitivePtr:(*utils.PrimitivePtr)(0xc00002e1e0)}
--- PASS: TestNoZero/&utils.NonZeroStruct{PrimitivePtr:(*utils.PrimitivePtr)(0xc00002e1e0)} (0.00s)
=== RUN TestNoZero/utils.NonZeroStruct{PrimitivePtr:(*utils.PrimitivePtr)(0xc00002e1e0)}
--- PASS: TestNoZero/utils.NonZeroStruct{PrimitivePtr:(*utils.PrimitivePtr)(0xc00002e1e0)} (0.00s)
--- PASS: TestNoZero (0.01s)
=== RUN TestIsValueZero
=== RUN TestIsValueZero/0
--- PASS: TestIsValueZero/0 (0.00s)
=== RUN TestIsValueZero/0#01
--- PASS: TestIsValueZero/0#01 (0.00s)
=== RUN TestIsValueZero/0#02
--- PASS: TestIsValueZero/0#02 (0.00s)
=== RUN TestIsValueZero/0#03
--- PASS: TestIsValueZero/0#03 (0.00s)
=== RUN TestIsValueZero/0#04
--- PASS: TestIsValueZero/0#04 (0.00s)
=== RUN TestIsValueZero/0x0
--- PASS: TestIsValueZero/0x0 (0.00s)
=== RUN TestIsValueZero/0x0#01
--- PASS: TestIsValueZero/0x0#01 (0.00s)
=== RUN TestIsValueZero/0x0#02
--- PASS: TestIsValueZero/0x0#02 (0.00s)
=== RUN TestIsValueZero/0x0#03
--- PASS: TestIsValueZero/0x0#03 (0.00s)
=== RUN TestIsValueZero/0x0#04
--- PASS: TestIsValueZero/0x0#04 (0.00s)
=== RUN TestIsValueZero/0#05
--- PASS: TestIsValueZero/0#05 (0.00s)
=== RUN TestIsValueZero/time.Date(1,_time.January,_1,_0,_0,_0,_0,_time.UTC)
--- PASS: TestIsValueZero/time.Date(1,_time.January,_1,_0,_0,_0,_0,_time.UTC) (0.00s)
=== RUN TestIsValueZero/time.Date(1,_time.January,_1,_0,_0,_0,_0,_time.UTC)#01
--- PASS: TestIsValueZero/time.Date(1,_time.January,_1,_0,_0,_0,_0,_time.UTC)#01 (0.00s)
=== RUN TestIsValueZero/<nil>
--- PASS: TestIsValueZero/<nil> (0.00s)
=== RUN TestIsValueZero/utils.ZeroStruct{}
--- PASS: TestIsValueZero/utils.ZeroStruct{} (0.00s)
=== RUN TestIsValueZero/&utils.ZeroStruct{}
--- PASS: TestIsValueZero/&utils.ZeroStruct{} (0.00s)
--- PASS: TestIsValueZero (0.00s)
PASS
`
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2539
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com >
Co-authored-by: Jinhan He <hjh497804227@gmail.com >
Co-committed-by: Jinhan He <hjh497804227@gmail.com >
2025-10-18 20:08:55 +00:00
Jinhan He and Lunny Xiao
1c9e31366c
fix(AssignValue): use DefaultJSONHandler ( #2540 )
...
close #2514
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2540
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com >
Co-authored-by: Jinhan He <hjh497804227@gmail.com >
Co-committed-by: Jinhan He <hjh497804227@gmail.com >
2025-10-18 20:04:22 +00:00
Jinhan He and Lunny Xiao
628770b85f
fix: error checking in NewEngineWithParams ( #2538 )
...
Description:
- fix the issue that no error checking in this NewEngineWithParams.
close #2492
old pr: https://gitea.com/xorm/xorm/pulls/2491
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2538
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com >
Co-authored-by: Jinhan He <hjh497804227@gmail.com >
Co-committed-by: Jinhan He <hjh497804227@gmail.com >
2025-10-17 23:23:29 +00:00
mav and Lunny Xiao
b21bdb9872
fix: use string keys for stmt cache to prevent crc32 collision ( #2536 )
...
Go's map implementation already hashes string keys internally, making the extra CRC32 layer redundant and prone to collisions that introduces security vulnerabilities. This change simplifies the statement cache, eliminates a collision-based vulnerabilities, and improves overall clarity.
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2536
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com >
Co-authored-by: mav <mav@noreply.gitea.com >
Co-committed-by: mav <mav@noreply.gitea.com >
2025-10-14 02:33:09 +00:00
wxiaoguang and Lunny Xiao
dcabd2bca7
Drop unmaintained json-iterator ( #2535 )
...
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2535
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com >
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
Co-committed-by: wxiaoguang <wxiaoguang@gmail.com >
2025-09-28 14:26:19 +00:00
Lunny Xiao
0c11d8a5b0
Upgrade pgx ( #2534 )
...
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2534
2025-09-15 02:41:04 +00:00
Lunny Xiao
31310cc521
upgrade go to 1.20 ( #2531 )
...
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2531
2025-09-14 05:34:55 +00:00
Lunny Xiao
eb68439961
Fix bug ( #2532 )
...
Fix #2529
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2532
2025-09-14 04:29:33 +00:00