cube.js sql 支持简单说明

目前cube.js 官方文档提供了sql 的说明,同时cube cloud 也可以体验了。。。。
cubesql 设计还是比较有意思的,具体的我以前也简单介绍过,目前官方
文档提供了之后可以更好的学习了解,而且还提供了一个灵活的认证接口

 
module.exports = {
  checkSqlAuth: async (req, username) => {
    const userInfo = await getUserFromLDAP(username);
    if (userInfo) {
      return {
        password: 'mypassword',
        securityContext: {},
      };
    }
 
    throw new Error('Incorrect user name or password');
  },
};

cubesql native 集成下载使用了一个有趣的扩展@mapbox/node-pre-gyp,也可以学习下,很不错的native 集成工具

 

 

说明

详细信息最好先参考官方文档

参考资料

https://cube.dev/docs/backend/sql
https://www.npmjs.com/package/@mapbox/node-pre-gyp

posted on 2021-11-18 23:04  荣锋亮  阅读(170)  评论(0编辑  收藏  举报

导航