Skip to content

Commit

Permalink
feat(cmd/gf): add ShardingPattern option for command gf gen dao t…
Browse files Browse the repository at this point in the history
…o support generating dao files sharding tables (#4081)
  • Loading branch information
gqcn authored Dec 26, 2024
1 parent f66e097 commit fc9093a
Show file tree
Hide file tree
Showing 29 changed files with 1,143 additions and 866 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/ci-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,13 @@ jobs:
- 3306:3306

# MariaDb backend server.
# docker run -d --name mariadb \
# -p 3307:3306 \
# -e MYSQL_DATABASE=test \
# -e MYSQL_ROOT_PASSWORD=12345678 \
# mariadb:11.4
mariadb:
image: mariadb:10.4
image: mariadb:11.4
env:
MARIADB_DATABASE: test
MARIADB_ROOT_PASSWORD: 12345678
Expand Down
4 changes: 3 additions & 1 deletion cmd/gf/internal/cmd/cmd_gen_dao.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@ package cmd

import (
_ "github.com/gogf/gf/contrib/drivers/clickhouse/v2"
// _ "github.com/gogf/gf/contrib/drivers/dm/v2" // precompilation does not support certain target platforms.
_ "github.com/gogf/gf/contrib/drivers/mssql/v2"
_ "github.com/gogf/gf/contrib/drivers/mysql/v2"
_ "github.com/gogf/gf/contrib/drivers/oracle/v2"
_ "github.com/gogf/gf/contrib/drivers/pgsql/v2"
_ "github.com/gogf/gf/contrib/drivers/sqlite/v2"

// do not add dm in cli pre-compilation,
// the dm driver does not support certain target platforms.
// _ "github.com/gogf/gf/contrib/drivers/dm/v2"
"github.com/gogf/gf/cmd/gf/v2/internal/cmd/gendao"
)

Expand Down
Loading

0 comments on commit fc9093a

Please sign in to comment.