npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@cloudbase/framework-plugin-database

v1.9.7

Published

云开发 Tencent CloudBase Framework Database Plugin 插件,将项目下的后端应用一键部署云开发云托管应用环境,提供自动弹性伸缩的高性能服务。

Downloads

513

Readme

Tencent CloudBase Framework Database Plugin

Tencent CloudBase Framework Database Plugin

Github License Npm version issue PRs Welcome star

云开发 CloudBase Framework 框架「Database」插件: 通过云开发 CloudBase Framework 框架一键配置云开发数据库集合、索引,使用高性能的 Serverless 化的 NoSQL 数据库服务。可以搭配其他插件如 Website 插件、Node 插件实现云端一体开发。

功能特性

使用方法

步骤一. 准备工作

具体步骤请参照 准备云开发环境和 CloudBase CLI 命令工具

步骤二. 进入项目目录进行初始化

如果是目前已有的后端应用项目

cloudbase

如果想全新开始一个项目,可以直接执行 init 来从模板开始一个项目

cloudbase init

步骤三. 一键部署

cloudbase framework deploy

配置

默认情况下不需要任何配置即可使用,以下配置参数针对有特殊需求的场景

配置示例

cloudbase init 之后会创建云开发的配置文件 cloudbaserc.json,可在配置文件的 plugins 里修改和写入插件配置

{
  "envId": "{{envId}}",
  "framework": {
    "plugins": {
      "client": {
        "use": "@cloudbase/framework-plugin-database",
        "inputs": {
          "collections": [
            {
              "collectionName": "test-collection"
            }
          ]
        }
      }
    }
  }
}

配置参数说明

collections

必填,数据库集合信息,数组类型

| 属性名称 | 类型 | 长度 | 是否必填 | 描述 | | :------------- | :------- | :---- | :------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | collectionName | String | 1-64 | 是 | 集合名称 | | description | String | 1-128 | 是 | 描述信息 | | createIndexes | Array. | 1-20 | 否 | 创建的索引 | | dropIndexes | Array. | 1-20 | 否 | 删除的索引 | | aclTag | String | 1-32 | 否 | 权限标签。包含以下取值: READONLY:所有用户可读,仅创建者和管理员可写 PRIVATE:仅创建者及管理员可读写 ADMINWRITE:所有用户可读,仅管理员可写 ADMINONLY:仅管理员可读写 CUSTOM:自定义安全规则 | | aclRule | JSON | | 否 | aclTag 为 CUSTOM 时,填写安全规则内容, 请参考安全规则编写 |

createIndex 对象

| 属性名称 | 类型 | 长度 | 是否必填 | 描述 | | :------- | :------------ | :--- | :------- | :----------- | | name | String | 1-64 | 是 | 索引名称 | | unique | Boolean | - | 是 | 是否唯一索引 | | keys | Array.< key > | 1-20 | 是 | 描述信息 |

key 对象

| 属性名称 | 类型 | 长度 | 是否必填 | 描述 | | :-------- | :------- | :--- | :------- | :-------------------------------------------------------------- | | name | String | 1-64 | 是 | 字段名 | | direction | String | 1-8 | 是 | 字段排序,可枚举值:-1(降序)、1(升序)、2dsphere(地理位置) |

dropIndex 对象

| 属性名称 | 类型 | 长度 | 是否必填 | 描述 | | :------- | :------- | :--- | :------- | :------- | | name | String | 1-64 | 是 | 索引名称 |

更多插件

请访问 CloudBase Framework 插件列表 搭配使用其他插件

文档资料