Socket
Socket
Sign inDemoInstall

@saas-plat/metaquery

Package Overview
Dependencies
249
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @saas-plat/metaquery

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


Version published
Maintainers
1
Install size
19.6 MB
Created

Readme

Source

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();

Keywords

FAQs

Last updated on 06 Jan 2021

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc