Navigation

    MemFireDB论坛

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    系统公告 | MemFire Cloud推出微信小程序SDK

    公告
    2
    3
    64
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      admin last edited by

      简介

      喜大普奔, MemFire Cloud推出了基于supabase JavaScript库进行改造的supabase-wechat-stable客户端,可以较好的适用国内微信小程序生态。

      supabase-wechat-stable说明:

      • 支持的小程序平台:微信小程序

      • 提供数据库、存储、认证等基本操作API接口,具体可以参考在线文档;

      • 接口调用方法supabase-js一致,无额外学习成本;

      下载地址

      supabase-wechat-stable获取地址:

      github地址:https://github.com/MemFire-Cloud/supabase-wechat-stable

      npm地址:https://www.npmjs.com/package/supabase-wechat-stable

      安装

      使用npm命令安装客户端:

      npm install supabase-wechat-stable
      

      初始化使用示例

      创建客户端,查询数据表。

      import { createClient } from 'supabase-wechat-stable'
      
      // Create a single supabase client for interacting with your database
      const supabase = createClient('https://xyzcompany.supabase.co', 'public-anon-key')
      
      //queryData
      let info = null;
      const { data, error } = await supabase
        .from('cities')
        .select()
        if (error) {
         wx.showToast({
              title: error.data.msg || '',
              icon: 'none',
              duration: 3000
            });
            return;
        }
        info = data.data;
      

      特别说明

      如果用户开发微信小程序,则使用supabase-wechat-stable库;

      如果用户开发Web/App应用,则使用supabase/supabase-js库。

      接下来,MemFire Cloud产品团队会继续适配更多的小程序平台,满足广大用户的使用需求,敬请期待~

      1 Reply Last reply Reply Quote 0
      • A
        admin @YYX last edited by

        @yyx
        您好,具体可以参考问题回复
        https://community.memfiredb.com/topic/199/订阅实时变化怎么实现

        1 Reply Last reply Reply Quote 0
        • Y
          YYX last edited by

          微信小程序SDK不支持这个吗
          2be9d74f-e300-4568-a007-5908a39f9009-image.png

          A 1 Reply Last reply Reply Quote 0
          • First post
            Last post