Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

查询数据库元数据 #71

Closed
Onesimu opened this issue Feb 19, 2019 · 4 comments
Closed

查询数据库元数据 #71

Onesimu opened this issue Feb 19, 2019 · 4 comments

Comments

@Onesimu
Copy link

Onesimu commented Feb 19, 2019

现在的系统里怎么样可以查询到一些数据表和字段的元数据呢 比如字段名称 类型 备注等等 在前端应用中需要这些信息做一些处理

@TommyLemon
Copy link
Collaborator

TommyLemon commented Feb 19, 2019

打开 http://apijson.org/
F12 打开控制台,然后刷新就能看到了,右侧上滑出来的文档(数据字典)就是你要的,

image

在 Network 里可以看到发送了这样的请求
http://apijson.cn:8080/get

{
    "[]": {
        "count": 0,
        "Table": {
            "table_schema": "sys",
            "table_type": "BASE TABLE",  //过滤非业务表
            "table_name!$": [  //过滤非业务表
                "\\_%",
                "sys\\_%",
                "system\\_%"
            ],
            "@order": "table_name+",
            "@column": "table_name,table_comment"
        },
        "Column[]": {
            "count": 0,
            "Column": {
                "table_schema": "sys",
                "table_name@": "[]/Table/table_name",
                "@column": "column_name,column_type,column_comment"
            }
        }
    }
}

@TommyLemon
Copy link
Collaborator

#67
这个链接有说明 Request, Document, Function, Access 表对应生成的文档

@Onesimu
Copy link
Author

Onesimu commented Mar 22, 2019

求助 最新的3.4.9版本这个元数据查不出来了 如果把DemoSQLConfig的getSchema改为空字符串, 就可以查出来, 但是数据就查不出来了 反之则是能查到表数据, 查不到元数据 说是找不到Tables表

@TommyLemon
Copy link
Collaborator

@Onesimu 具体报错发下哦,可以是接口返回的错误信息,或者 APIJSON Server 控制台日志,都有就最好了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants