Skip to content

查询引擎,把元数据实体转换成GQL对象查询

License

Notifications You must be signed in to change notification settings

saas-plat/metaquery

Repository files navigation

metaquery

通过元数据定义查询对象提供数据服务

定义查询对象

const {
  MetaTable
} = require('@saas-plat/metaquery');

const BankAccountTable = MetaTable.createModel('BankAccountTable',{
  fields:{
    "Code": {type:"string",mapping:'code'},
    "Name": {type:"string",mapping:'name'},
    "NewBalance": "number"
  }
});

查询对象类型与服务

  • 数据表
  • 汇总表
  • 树表
  • 联合表

数据迁移

const datamigration = new Migration([BankAccountTable1], [BankAccountTable2]);
await datamigration.backup();
datamigration.onAction(()=>{
  // 升级规则
  ...
})
await datamigration.up('v1','v2');
await datamigration.dropback();

About

查询引擎,把元数据实体转换成GQL对象查询

Resources

License

Stars

Watchers

Forks

Packages

No packages published