xorm工具在mac系统下不能使用? #253
Labels
No Label
backport/done
backport/v1
blocked
db
oracle
db
sqlserver
duplicate
feature
cache
frontport/done
frontport/main
invalid
kind
breaking
kind
bug
kind
build
kind
dependencies
kind
docs
kind
driver
kind
enhancement
kind
feature
kind
performance
kind
proposal
kind
question
kind
refactor
kind
testing
need
feedback
need
test
proposal:accepted
RaspBerry Pi
regression
skip-changelog
upstream
wip
wontfix
No Milestone
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: xorm/xorm#253
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
执行:
xorm reverse mysql root:@/track?charset=utf8 ./
打印出:
xxxMacBook-Pro:tmp xxxx$ xorm reverse mysql root:@/track?charset=utf8 ./
[xorm] [info] 2015/06/06 07:14:21.426513 [sql] SELECT
TABLE_NAME
,ENGINE
,TABLE_ROWS
,AUTO_INCREMENT
fromINFORMATION_SCHEMA
.TABLES
WHERETABLE_SCHEMA
=? AND (ENGINE
='MyISAM' ORENGINE
= 'InnoDB') [track]//一堆下面这样的信息
[xorm] [info] 2015/06/06 07:14:21.448934 [sql] SELECT
INDEX_NAME
,NON_UNIQUE
,COLUMN_NAME
FROMINFORMATION_SCHEMA
.STATISTICS
WHERETABLE_SCHEMA
= ? ANDTABLE_NAME
= ? [track users]最后只建了一个空目录model,log没错误,也没生成其它文件
还有一个错:
[Error] reverse.go:184 template: /Users/xxx/go/src/github.com/xxx/track/tmp/.DS_Store:4: unexpected "," in operand; missing space?
.DS_Store是系统隐藏文件,应该要过滤掉的
好吧,是我使用方式不对。
xorm reverse mysql root:@/track?charset=utf8 $GOPATH/src/github.com/go-xorm/cmd/xorm/templates/goxorm ./
倒数第二个templates参数是cmd模板的路径
这是我见过封装最奇怪的命令工具了……
1、templates参数的传递太奇葩
2、修改lang=go genJson=1 参数竟然要到工具的源码里去改
望改进
这个可以改进为命令行的参数。
Since xorm tools have been deprecated. Just close now.