You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@evilemon/lowcode-datasource-engine

Package Overview
Dependencies
Maintainers
0
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@evilemon/lowcode-datasource-engine

DataSource Engine for lowcode

1.2.1
latest
npmnpm
Version published
Maintainers
0
Created
Source

关于 @alilc/lc-datasource-engine

低代码引擎数据源核心代码

doc

[原理介绍](https://yuque.antfin-inc.com/docs/share/6ba9dab7-0712-4302-a5bb-b17d4a5f8505?# 《DataSource Engine》)

[fetch流程图](https://yuque.antfin-inc.com/docs/share/e9baef9a-3586-40fc-8708-eaeee0d7937e?# 《fetch 流程》)

使用

// 面向运行时渲染,直接给 schema
import { create } from '@alilc/lowcode-datasource-engine/interpret'; 

// 面向出码,需要给处理过后的内容
import { create } from '@alilc/lowcode-datasource-engine/runtime'; 

import { createFetchHandler } from '@alilc/lowcode-datasource-fetch-handler';

import { createMtopHandler } from '@alilc/lowcode-datasource-mtop-handler';

// dataSource 可以是 schema 协议内容 或者是运行时的转化后的配置内容 (出码专用)


// context 上下文(setState 为必选)
const dataSourceEngine = create(dataSource, context, {
  requestHandlersMap: { // 可选参数,以下内容为当前默认的内容
    urlParams: handlersMap.urlParams('?bar=1&test=2'),
    fetch: createFetchHandler,
    mtop: createMtopHandler
  },
});


console.log(dsf.dataSourceMap) // 符合集团协议的 datasourceMap https://yuque.antfin-inc.com/mo/spec/spec-low-code-building-schema#QUSn5

dsf.dataSourceMap['id'].load() // 加载

dsf.dataSourceMap['id'].status // 获取状态

dsf.dataSourceMap['id'].data // 获取数据

dsf.dataSourceMap['id'].error // 获取错误信息 

dsf.reloadDataSource(); // 刷新所有数据源

FAQs

Package last updated on 25 Dec 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

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.