Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@zenorm/generate

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zenorm/generate

Easy ORM, easy query. easy typing! Auto generate typescript declaration.

latest
npmnpm
Version
2.1.1
Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

ZenORM Generate

ZenORM Table Structure Code Generation Tool

表结构代码生成工具

Generate Config - 代码生成配置

配置项类型默认值说明
hoststring目标数据库地址
portnumber数据库端口
userstring数据库用户名
passwordstring数据库密码
databasestring数据库名
outputDirstring'./src/model'代码输出目录
tablesFilenamestring'_tables'生成数据库表结构文件名
repositoriesFilenamestring'_repositories'生成 repositories 文件名
globalFilenamestring全局文件名 - 如果设置所有表将继承于此 - 例如设置为:'_global' - 如果文件不存在则自动创建
bindQuerybooleanfalserepositories 文件生成 bindQuery(query: QueryParam) 方法用于设置模型的 Query 源 - 并生成模型的静态 Repository 方法
generateRepositoriesbooleanfalse是否生成 Repositories 类 - 通常用于多租户模式做数据库前置绑定 Query 对象
declareRepositoriesToModulesstring[]是否需将 Repositories 实例定义到目标模块中 - 例如: ["@zenweb/core.Core.repositories"]
filterstring表过滤规则正则
includestring表包含规则正则

Keywords

mysql

FAQs

Package last updated on 17 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts