codegen: style fixes ('int64' -> 'int', 'SELECT' -> 'select')
This commit is contained in:
parent
c08f12e275
commit
eee6714918
@ -52,7 +52,7 @@ func GenerateModelAST(table schema.Table) *ast.GenDecl {
|
||||
} else if strings.HasSuffix(col.Name, "_at") {
|
||||
typeName = "Timestamp"
|
||||
} else {
|
||||
typeName = "int64"
|
||||
typeName = "int"
|
||||
}
|
||||
case "text":
|
||||
typeName = "string"
|
||||
@ -258,12 +258,12 @@ func GenerateGetAllItemsFunc(tbl schema.Table) *ast.FuncDecl {
|
||||
&ast.UnaryExpr{Op: token.AND, X: ast.NewIdent("ret")},
|
||||
&ast.BinaryExpr{
|
||||
X: &ast.BinaryExpr{
|
||||
X: &ast.BasicLit{Kind: token.STRING, Value: "`SELECT `"},
|
||||
X: &ast.BasicLit{Kind: token.STRING, Value: "`select `"},
|
||||
Op: token.ADD,
|
||||
Y: SQLFieldsConstIdent(tbl),
|
||||
},
|
||||
Op: token.ADD,
|
||||
Y: &ast.BasicLit{Kind: token.STRING, Value: "` FROM " + tbl.TableName + "`"},
|
||||
Y: &ast.BasicLit{Kind: token.STRING, Value: "` from " + tbl.TableName + "`"},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user