mirror of
https://gitee.com/johng/gf
synced 2026-06-06 02:25:47 +08:00
## Summary - Add wildcard pattern support (`*` and `?`) for `tables` configuration - Fix `tablesEx` wildcard to use exact match (`^$`) for consistency - Add warning when exact table name does not exist - Add unit tests and integration tests for MySQL and PostgreSQL ## Changes | Configuration | Before | After | |---------------|--------|-------| | `tables: "user_*"` | Not supported | Matches tables starting with "user_" | | `tables: "*"` | Not supported | Matches all tables | | `tablesEx: "user_*"` | Partial match | Exact match (consistent with tables) | ## Features - `*` matches any characters (e.g., `user_*` matches `user_info`, `user_log`) - `?` matches single character (e.g., `user_???` matches `user_log` but not `user_info`) - Mixed patterns and exact names supported (e.g., `tables: "user_*,config"`) - Non-existent exact table names are skipped with warning message ## Test plan - [x] Unit tests for `containsWildcard`, `patternToRegex`, `filterTablesByPatterns` (11 cases) - [x] Integration tests for MySQL (5 cases) - [x] Integration tests for PostgreSQL (1 case with tables + tablesEx) - [x] Standard SQL syntax for cross-database compatibility Closes #4629 --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
English | 简体中文
gf
gf is a powerful CLI tool for building GoFrame application with convenience.
1. Install
1) PreCompiled Binary
You can also install gf tool using pre-built binaries: https://github.com/gogf/gf/releases
-
Mac&Linuxwget -O gf https://github.com/gogf/gf/releases/latest/download/gf_$(go env GOOS)_$(go env GOARCH) && chmod +x gf && ./gf install -y && rm ./gfIf you're using
zsh, you might need rename your alias by commandalias gf=gfto resolve the conflicts betweengfandgit fetch. -
WindowsManually download, execute in command line it and then follow the instruction. -
Database support
DB builtin support remarks mysql yes - mariadb yes - tidb yes - mssql yes - oracle yes - pgsql yes - sqlite yes - sqlitecgo no to support sqlite database on 32bit architecture systems, manually add package import to the source codes and do the building. clickhouse yes - dm no manually add package import to the source codes and do the building.
2) Manually Install
go install github.com/gogf/gf/cmd/gf/v2@latest # latest version
go install github.com/gogf/gf/cmd/gf/v2@v2.5.5 # certain version(should be >= v2.5.5)
2. Commands
$ gf -h
USAGE
gf COMMAND [OPTION]
COMMAND
up upgrade GoFrame version/tool to latest one in current project
env show current Golang environment variables
fix auto fixing codes after upgrading to new GoFrame version
run running go codes with hot-compiled-like feature
gen automatically generate go files for dao/do/entity/pb/pbentity
tpl template parsing and building commands
init create and initialize an empty GoFrame project
pack packing any file/directory to a resource file, or a go file
build cross-building go project for lots of platforms
docker build docker image for current GoFrame project
install install gf binary to system (might need root/admin permission)
version show version information of current binary
doc download https://pages.goframe.org/ to run locally
OPTION
-y, --yes all yes for all command without prompt ask
-v, --version show version information of current binary
-d, --debug show internal detailed debugging information
-h, --help more information about this command
ADDITIONAL
Use "gf COMMAND -h" for details about a command.
3. FAQ
1). Command gf run returns pipe: too many open files
Please use ulimit -n 65535 to enlarge your system configuration for max open files for current terminal shell session, and then gf run.