Skip to content

Commit 39389b3

Browse files
committed
feat!: GitHub organization migration x-ream → fndome
## ⚠️ BREAKING CHANGE **GitHub organization migrated from `x-ream` to `fndome`** ### Changes **Before (v0.10.5)**: ```go module github.com/x-ream/xb import "github.com/x-ream/xb" ``` **Now (v0.11.0)**: ```go module github.com/fndome/xb import "github.com/fndome/xb" ``` --- ## 📝 File Changes ### Core Module - ✅ `go.mod` - module path: `github.com/fndome/xb` - ✅ 7 source files - internal import paths updated - ✅ 41 source files - Copyright updated: `2020 io.xream.sqlxb` → `2025 me.fndo.xb` ### Example Applications (4) - ✅ `examples/pgvector-app/` - go.mod + 3 source files - ✅ `examples/qdrant-app/` - go.mod + 4 source files - ✅ `examples/rag-app/` - go.mod + 3 source files - ✅ `examples/pageindex-app/` - go.mod + 1 source file ### Documentation - ✅ `README.md` - badges and import examples - ✅ `MIGRATION.md` - complete migration guide updated - v0.11.0 organization migration instructions - Three-step migration process - Batch replace commands - FAQ --- ## 🔄 User Migration Steps ### 1️⃣ Update go.mod ```bash # Migrate from v0.10.5 go get github.com/fndome/[email protected] ``` ### 2️⃣ Batch Replace Import Paths ```bash # Linux/macOS find . -name "*.go" -type f -exec sed -i 's|github.com/x-ream/xb|github.com/fndome/xb|g' {} + # Windows PowerShell Get-ChildItem -Recurse -Filter "*.go" | ForEach-Object { (Get-Content $_.FullName) -replace 'github.com/x-ream/xb', 'github.com/fndome/xb' | Set-Content $_.FullName } ``` ### 3️⃣ Run Tests ```bash go mod tidy go test ./... ``` --- ## ✅ Verification - ✅ Main project tests pass: `ok github.com/fndome/xb` - ✅ All internal imports updated - ✅ 4 example applications dependencies updated - ✅ Documentation fully updated --- ## 📋 Migration History ### v0.11.0 (2025-10-28) - GitHub organization: `x-ream` → `fndome` - Module path: `github.com/fndome/xb` - Repository URL: `https://github.com/fndome/xb` ### v0.10.5 (2025-10-28) - Package name: `sqlxb` → `xb` - Module path: `github.com/x-ream/xb` ### v0.10.4 and earlier - Package name: `sqlxb` - Module path: `github.com/x-ream/sqlxb` --- ## 💡 Why Migrate Organization? 1. **Brand Unification** - All projects under `fndome` organization 2. **Better Management** - Unified organizational structure 3. **Long-term Planning** - Prepare for future development --- **Impact**: All users need to update import paths **Difficulty**: ⭐ Easy (1 minute with batch replace) **Compatibility**: Package name remains `xb`, code unchanged
1 parent 27ce98c commit 39389b3

File tree

112 files changed

+1172
-744
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

112 files changed

+1172
-744
lines changed

CHANGELOG_v0.9.2.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,5 @@
4646

4747
---
4848

49-
**升级**`go get github.com/x-ream/[email protected]`
49+
**升级**`go get github.com/fndome/[email protected]`
5050

MIGRATION.md

Lines changed: 72 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,28 @@
22

33
## 🔄 项目重命名通知
44

5-
**版本**: v0.10.5
5+
**最新版本**: v0.11.0
66
**日期**: 2025-10-28
77

8-
`v0.10.5` 开始,项目从 `sqlxb` 重命名为 `xb`
8+
### 变更历史
9+
10+
#### v0.11.0 (2025-10-28)
11+
- ⚠️ **GitHub 组织迁移**: `x-ream/xb``fndome/xb`
12+
- 模块路径: `github.com/fndome/xb`
13+
- 仓库地址: `https://github.com/fndome/xb`
14+
15+
#### v0.10.5 (2025-10-28)
16+
- 包名变更: `sqlxb``xb`
17+
- 模块路径: `github.com/x-ream/xb`
918

1019
---
1120

1221
## 📋 为什么重命名?
1322

1423
1. **更简洁的名称** - `xb``sqlxb` 更短、更易记
15-
2. **品牌统一** - 与 x-ream 组织命名风格保持一致
24+
2. **品牌统一** - 统一到 fndome 组织
1625
3. **更好的可发现性** - 短名称在搜索和推荐时更具优势
26+
4. **包名统一** - 模块名 `xb` 与包名 `xb` 保持一致(v0.10.5)
1727

1828
---
1929

@@ -35,7 +45,7 @@ require (
3545
module your-project
3646

3747
require (
38-
github.com/x-ream/xb v0.10.5
48+
github.com/fndome/xb v0.11.0 // ⚠️ 组织已迁移
3949
)
4050
```
4151

@@ -46,28 +56,32 @@ require (
4656
**修改前**:
4757
```go
4858
import (
49-
"github.com/x-ream/sqlxb"
59+
"github.com/x-ream/sqlxb" // 旧组织 + 旧包名
5060
)
5161
```
5262

53-
**修改后**:
63+
**修改后(v0.11.0)**:
5464
```go
5565
import (
56-
"github.com/x-ream/xb"
66+
"github.com/fndome/xb" // ✅ 新组织 + 新模块名
5767
)
68+
69+
// 代码中使用 xb 包名
70+
builder := xb.Of(&User{}) // ✅ 包名已改为 xb
5871
```
5972

6073
---
6174

62-
### 3️⃣ 包名保持不变(向后兼容
75+
### 3️⃣ 包名已更改(⚠️ 破坏性变更
6376

64-
**无需修改代码** - 包名仍然是 `sqlxb`
77+
⚠️ **需要修改代码** - 包名从 `sqlxb` 改为 `xb`
6578

6679
```go
67-
// ✅ 这些代码无需修改
80+
// ❌ 旧代码(不再有效)
6881
builder := sqlxb.Of(&User{})
69-
qx := sqlxb.QdrantX{}
70-
built := builder.Build()
82+
83+
// ✅ 新代码
84+
builder := xb.Of(&User{})
7185
```
7286

7387
---
@@ -108,12 +122,12 @@ go mod tidy
108122

109123
### 1. 确认依赖更新
110124
```bash
111-
go list -m all | grep "x-ream"
125+
go list -m all | grep "fndome"
112126
```
113127

114128
**期望输出**:
115129
```
116-
github.com/x-ream/xb v0.10.5
130+
github.com/fndome/xb v0.11.0
117131
```
118132

119133
### 2. 运行测试
@@ -132,41 +146,62 @@ go build ./...
132146

133147
### Q1: 旧版本的 `sqlxb` 还能用吗?
134148

135-
**A**: 可以。旧的 `github.com/x-ream/sqlxb` 仓库会保留到 `v0.10.4`,但不再维护。建议尽快迁移到 `xb`
149+
**A**: 可以。旧的仓库会保留,但不再维护:
150+
- `github.com/x-ream/sqlxb` - 保留到 v0.10.4
151+
- `github.com/x-ream/xb` - 保留到 v0.10.5
152+
153+
建议迁移到新组织:`github.com/fndome/xb v0.11.0`
136154

137155
---
138156

139157
### Q2: 我需要修改代码中的 `sqlxb` 包名吗?
140158

141-
**A**: **不需要**。包名仍然是 `sqlxb`,只需要修改 `import` 路径即可
159+
**A**: **需要!** 从 v0.10.5 开始,包名已改为 `xb`
142160

143161
```go
144162
import (
145-
"github.com/x-ream/xb" //只改这里
163+
"github.com/fndome/xb" //v0.11.0 新组织路径
146164
)
147165

148-
// ✅ 代码无需修改
166+
// ⚠️ 需要修改所有代码
167+
// ❌ 旧代码
149168
builder := sqlxb.Of(&User{})
169+
170+
// ✅ 新代码
171+
builder := xb.Of(&User{})
172+
```
173+
174+
**批量替换**:
175+
```bash
176+
# 1. 替换 import 路径
177+
find . -name "*.go" -type f -exec sed -i 's|github.com/x-ream/xb|github.com/fndome/xb|g' {} +
178+
179+
# 2. 替换包名(如果还在用 sqlxb)
180+
find . -name "*.go" -type f -exec sed -i 's/sqlxb\./xb\./g' {} +
150181
```
151182

152183
---
153184

154185
### Q3: 我的项目使用了 v0.10.4 之前的版本,怎么办?
155186

156-
**A**: 分两步迁移
187+
**A**: 分三步迁移
157188

158-
1. **先升级到 v0.10.4**(仍使用 `sqlxb`
159-
2. **再升级到 v0.10.5**(切换到 `xb`
189+
1. **先升级到 v0.10.4**(仍使用 `sqlxb`,旧组织)
190+
2. **再升级到 v0.10.5**(切换到 `xb`,旧组织)
191+
3. **最后升级到 v0.11.0**(新组织)
160192

161193
```bash
162-
# Step 1
194+
# Step 1: 升级到 v0.10.4(包名 sqlxb)
163195
go get github.com/x-ream/[email protected]
164196
go mod tidy
165197

166-
# 测试确认无误后
167-
# Step 2
198+
# Step 2: 升级到 v0.10.5(包名 xb,组织 x-ream)
168199
go get github.com/x-ream/[email protected]
169-
# 然后按照上面的步骤修改 import 路径
200+
# 批量替换: sqlxb. → xb.
201+
202+
# Step 3: 升级到 v0.11.0(组织 fndome)
203+
go get github.com/fndome/[email protected]
204+
# 批量替换: github.com/x-ream/xb → github.com/fndome/xb
170205
```
171206

172207
---
@@ -177,22 +212,26 @@ go get github.com/x-ream/[email protected]
177212

178213
**修改前**:
179214
```go
180-
replace github.com/x-ream/sqlxb => /path/to/local/sqlxb
215+
replace github.com/x-ream/xb => /path/to/local/xb
181216
```
182217

183-
**修改后**:
218+
**修改后(v0.11.0)**:
184219
```go
185-
replace github.com/x-ream/xb => /path/to/local/xb
220+
replace github.com/fndome/xb => /path/to/local/xb
186221
```
187222

188223
---
189224

190225
## 🔗 相关资源
191226

192-
- **GitHub 仓库**: https://github.com/x-ream/xb
193-
- **文档**: https://github.com/x-ream/xb/blob/main/README.md
194-
- **Roadmap**: https://github.com/x-ream/xb/blob/main/doc/ROADMAP_v1.0.0.md
195-
- **Issues**: https://github.com/x-ream/xb/issues
227+
- **GitHub 仓库**: https://github.com/fndome/xb
228+
- **文档**: https://github.com/fndome/xb/blob/main/README.md
229+
- **Roadmap**: https://github.com/fndome/xb/blob/main/doc/ROADMAP_v1.0.0.md
230+
- **Issues**: https://github.com/fndome/xb/issues
231+
232+
### 旧仓库(只读)
233+
- **x-ream/sqlxb**: https://github.com/x-ream/sqlxb (保留到 v0.10.4)
234+
- **x-ream/xb**: https://github.com/x-ream/xb (保留到 v0.10.5)
196235

197236
---
198237

@@ -201,7 +240,7 @@ replace github.com/x-ream/xb => /path/to/local/xb
201240
如果您在迁移过程中遇到问题:
202241

203242
1. **查阅文档**: [doc/README.md](./doc/README.md)
204-
2. **提交 Issue**: https://github.com/x-ream/xb/issues
243+
2. **提交 Issue**: https://github.com/fndome/xb/issues
205244
3. **查看示例**: [examples/](./examples/README.md)
206245

207246
---

README.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# xb
2-
[![OSCS Status](https://www.oscs1024.com/platform/badge/x-ream/xb.svg?size=small)](https://www.oscs1024.com/project/x-ream/xb?ref=badge_small)
3-
![workflow build](https://github.com/x-ream/xb/actions/workflows/go.yml/badge.svg)
4-
[![GitHub tag](https://img.shields.io/github/tag/x-ream/xb.svg?style=flat)](https://github.com/x-ream/xb/tags)
5-
[![Go Report Card](https://goreportcard.com/badge/github.com/x-ream/xb)](https://goreportcard.com/report/github.com/x-ream/xb)
2+
[![OSCS Status](https://www.oscs1024.com/platform/badge/fndome/xb.svg?size=small)](https://www.oscs1024.com/project/fndome/xb?ref=badge_small)
3+
![workflow build](https://github.com/fndome/xb/actions/workflows/go.yml/badge.svg)
4+
[![GitHub tag](https://img.shields.io/github/tag/fndome/xb.svg?style=flat)](https://github.com/fndome/xb/tags)
5+
[![Go Report Card](https://goreportcard.com/badge/github.com/fndome/xb)](https://goreportcard.com/report/github.com/fndome/xb)
66

77
> 🔄 **Project Renamed (v0.10.5)**: `sqlxb``xb`
88
> 📖 **[Migration Guide](./MIGRATION.md)** - Update your `go.mod` and imports in 2 minutes
@@ -31,10 +31,10 @@ also can build json for some json parameter db, like [Qdrant](https://github.com
3131

3232
```go
3333
// MySQL (existing)
34-
sqlxb.Of(&Order{}).Eq("status", 1).Build().SqlOfSelect()
34+
xb.Of(&Order{}).Eq("status", 1).Build().SqlOfSelect()
3535

3636
// VectorDB (v0.10.0) - Same API!
37-
sqlxb.Of(&CodeVector{}).
37+
xb.Of(&CodeVector{}).
3838
Eq("language", "golang").
3939
VectorSearch("embedding", queryVector, 10).
4040
QdrantX(func(qx *QdrantBuilderX) {
@@ -99,8 +99,8 @@ This makes xb **one of the first major Go ORM projects successfully maintained b
9999
var Db *sqlx.DB
100100
....
101101

102-
var c Cat
103-
builder := sqlxb.Of(&c).Gt("id", 10000).And(func(cb *CondBuilder) {
102+
var c Cat
103+
builder := xb.Of(&c).Gt("id", 10000).And(func(cb *CondBuilder) {
104104
cb.Gte("price", catRo.Price).OR().Eq("is_sold", catRo.IsSold)
105105
})
106106

@@ -151,7 +151,7 @@ Please check [CONTRIBUTING](./doc/CONTRIBUTING.md)
151151
```Go
152152

153153
import (
154-
. "github.com/x-ream/xb"
154+
. "github.com/fndome/xb"
155155
)
156156

157157
type Cat struct {
@@ -170,8 +170,8 @@ func (*Cat) TableName() string {
170170
}
171171

172172
// IsSold, Price, fields can be zero, must be pointer, like Java Boolean....
173-
// sqlxb has func: Bool(true), Int(v) ....
174-
// sqlxb no relect, not support omitempty, should rewrite ro, dto
173+
// xb has func: Bool(true), Int(v) ....
174+
// xb no relect, not support omitempty, should rewrite ro, dto
175175
type CatRo struct {
176176
Name string `json:"name, string"`
177177
IsSold *bool `json:"isSold, *bool"`
@@ -253,7 +253,7 @@ func main() {
253253

254254
```Go
255255
import (
256-
. "github.com/x-ream/xb"
256+
. "github.com/fndome/xb"
257257
)
258258

259259
func main() {
@@ -311,7 +311,7 @@ Characteristics:
311311
- No clear structure
312312
313313
Example:
314-
sqlxb.Of(&Product{}).
314+
xb.Of(&Product{}).
315315
VectorSearch("embedding", userVector, 20).
316316
Eq("category", "electronics")
317317
```
@@ -336,7 +336,7 @@ Characteristics:
336336
- Context preservation required
337337
338338
Example:
339-
sqlxb.Of(&PageIndexNode{}).
339+
xb.Of(&PageIndexNode{}).
340340
Eq("doc_id", docID).
341341
Like("title", "Financial Stability").
342342
Eq("level", 1)
@@ -361,12 +361,12 @@ Characteristics:
361361
362362
Example:
363363
// Step 1: PageIndex locates chapter
364-
sqlxb.Of(&PageIndexNode{}).
364+
xb.Of(&PageIndexNode{}).
365365
Like("title", "Investment Advice").
366366
Eq("level", 2)
367367
368368
// Step 2: Vector search within chapter
369-
sqlxb.Of(&DocumentChunk{}).
369+
xb.Of(&DocumentChunk{}).
370370
VectorSearch("embedding", queryVector, 10).
371371
Gte("page", chapterStartPage).
372372
Lte("page", chapterEndPage)
@@ -391,7 +391,7 @@ Characteristics:
391391
- No semantic understanding needed
392392
393393
Example:
394-
sqlxb.Of(&User{}).
394+
xb.Of(&User{}).
395395
Gte("age", 18).
396396
Eq("status", "active").
397397
Paged(...)

all_filtering_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2020 io.xream.sqlxb
1+
// Copyright 2025 me.fndo.xb
22
//
33
// Licensed to the Apache Software Foundation (ASF) under one or more
44
// contributor license agreements. See the NOTICE file distributed with

bb.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2020 io.xream.sqlxb
1+
// Copyright 2025 me.fndo.xb
22
//
33
// Licensed to the Apache Software Foundation (ASF) under one or more
44
// contributor license agreements. See the NOTICE file distributed with

builder_insert.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2020 io.xream.sqlxb
1+
// Copyright 2025 me.fndo.xb
22
//
33
// Licensed to the Apache Software Foundation (ASF) under one or more
44
// contributor license agreements. See the NOTICE file distributed with

builder_update.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2020 io.xream.sqlxb
1+
// Copyright 2025 me.fndo.xb
22
//
33
// Licensed to the Apache Software Foundation (ASF) under one or more
44
// contributor license agreements. See the NOTICE file distributed with

0 commit comments

Comments
 (0)