xorm工具在mac系统下不能使用? #253

Closed
opened 2015-06-05 23:22:26 +00:00 by baiyuxiong · 4 comments
baiyuxiong commented 2015-06-05 23:22:26 +00:00 (Migrated from github.com)

执行:
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 from INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA=? AND (ENGINE='MyISAM' OR ENGINE = 'InnoDB') [track]
//一堆下面这样的信息
[xorm] [info] 2015/06/06 07:14:21.448934 [sql] SELECT INDEX_NAME, NON_UNIQUE, COLUMN_NAME FROM INFORMATION_SCHEMA.STATISTICS WHERE TABLE_SCHEMA = ? AND TABLE_NAME = ? [track users]
最后只建了一个空目录model,log没错误,也没生成其它文件

执行: 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` from `INFORMATION_SCHEMA`.`TABLES` WHERE `TABLE_SCHEMA`=? AND (`ENGINE`='MyISAM' OR `ENGINE` = 'InnoDB') [track] //一堆下面这样的信息 [xorm] [info] 2015/06/06 07:14:21.448934 [sql] SELECT `INDEX_NAME`, `NON_UNIQUE`, `COLUMN_NAME` FROM `INFORMATION_SCHEMA`.`STATISTICS` WHERE `TABLE_SCHEMA` = ? AND `TABLE_NAME` = ? [track users] 最后只建了一个空目录model,log没错误,也没生成其它文件
baiyuxiong commented 2015-06-05 23:41:30 +00:00 (Migrated from github.com)

还有一个错:
[Error] reverse.go:184 template: /Users/xxx/go/src/github.com/xxx/track/tmp/.DS_Store:4: unexpected "," in operand; missing space?
.DS_Store是系统隐藏文件,应该要过滤掉的

还有一个错: [Error] reverse.go:184 template: /Users/xxx/go/src/github.com/xxx/track/tmp/.DS_Store:4: unexpected "," in operand; missing space? .DS_Store是系统隐藏文件,应该要过滤掉的
baiyuxiong commented 2015-06-06 00:02:23 +00:00 (Migrated from github.com)

好吧,是我使用方式不对。
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 参数竟然要到工具的源码里去改

望改进

好吧,是我使用方式不对。 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.

Since xorm tools have been deprecated. Just close now.
lunny closed this issue 2021-07-19 05:17:46 +00:00
lunny removed this from the (deleted) milestone 2021-07-29 03:26:43 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: xorm/xorm#253
No description provided.