semanticdb-core
TypeScript icon, indicating that this package has built-in type declarations

1.0.11 • Public • Published

SemanticDB Core

本项目是 SemanticDB 的最底层的公共项目,主要定义了 Schema、Property、Logicform 的类型,以及基于这些概念的一些帮助函数。

本项目的定义以及帮助函数会供 SemanticDB、Alisa 和 Frontend 使用。

API 参考

Schema 相关

  • findPropertyByName: 在指定的 schema 中查找属性,支持链式查找(如 a_b_c
  • findDisplayNameProperty: 查找 schema 中的显示名称属性
  • getDrilldownDimensions: 获取 schema 的下钻维度

Property 相关

Logicform 相关

  • isDimensionInQuery: 判断维度是否在 Query 中使用
  • getFlattenQuery: 将嵌套的查询对象扁平化(如 { customer: { query: { name: '张三' } } } 转换为 { 'customer_name': '张三' }

安装

npm install semanticdb-core

Readme

Keywords

none

Package Sidebar

Install

npm i semanticdb-core

Weekly Downloads

19

Version

1.0.11

License

MIT

Unpacked Size

23.4 kB

Total Files

22

Last publish

Collaborators

  • kilik52