代码生成语言初设计
#数据库相关代码
#命令{dbhost,database(db),dbuser,dbpassword,namespace(ns),savepath(sp),gm,gd,ar}
dbhost 127.0.0.1
db test_data_base
dbuser root
dbpassword 123456
namespace PetShop.Model
savepath "E:/project/my project/PetShop.Model"
#生成实体类
gm _all_
gm user
gm user,order
namespace PetShop.DAL
savepath "E:/project/my project/PetShop.DAL"
#生成DAL
#{
# select(primary key),
# selects(primary keys),
# insert(),
# update(),
# delete(primary key),
# deletes(primary keys)
#}
gd _all_
gd user
gd user.select(email)
gd user.selects(email)
gd user.select(username,password)
gd user.selects(username,password)
gd order.select(sn)
gd order.selects(username)
namespace NetworkExam.DAL.ActiveRecord
savepath "E:/project/my project/PetShop.DAL.ActiveRecord"
#生成活动目录 ActiveRecord
ar _all_
ar user
ar user,order
ar user.select(username,password)