搜索插件、代码仓与 APP 分类

插件详情v2.3.2+6

rethinkdb_dart

RethinkDB v2.3 的 Dart 2 驱动程序。

近 30 天下载
2
喜欢数
28
Pub 分数
25

安装插件

flutter pub add rethinkdb_dart

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

RethinkDB v2.3 的 Dart 2 驱动程序,可实现 Dart 应用程序与 RethinkDB 数据库之间的无缝集成。它提供了一个简单的 API,用于连接、查询和管理 Flutter 或其他基于 Dart 的项目中的数据。专为实时数据同步设计,支持变更馈送和响应式编程模式。该驱动程序轻量且专注于核心数据库操作,适用于需要实时数据更新和高效后端通信的应用。

适合场景

  • Flutter 应用中的实时数据同步
  • 使用实时更新构建响应式仪表板
  • 将 RethinkDB 集成到 Dart 后端
  • 使用变更日志处理流式数据
  • 开发协作式网络应用程序

主要特点

  • 支持 RethinkDB v2.3
  • 提供变更流功能
  • 轻量且简洁的 API
  • 与 Flutter 和 Dart CLI 兼容
  • 提供连接池和错误处理

适合对象

  • 使用 RethinkDB 的 Dart 开发人员
  • 需要实时数据流的应用程序
  • 需要响应式数据库查询的项目
  • 使用 Dart 构建的后端服务
  • 快速原型数据驱动界面

使用建议

  • 限制为 RethinkDB v2.3
  • 对较新版本的 RethinkDB 没有官方支持
  • 需要手动设置数据库连接
  • 不再积极维护,仅支持到 v2.3
  • 最适合中小型应用程序

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

Build Status

Dart 2 and Flutter RethinkDB Driver

A Dart 2 and Flutter driver for RethinkDB v2.3.

This is a fork of RethinkDB Driver, that was created to update the driver to Dart 2 and Flutter.

Getting Started:

The driver api tries to align with the javascript and python RethinkDB drivers. You can read their documentation here.

To include this driver in your own project add the package to your pubspec.yaml file:

dependencies:
  rethinkdb_dart: '^2.3.2+6'

Or to use bleeding edge:

dependencies:
  rethinkdb_dart:
    git: git://github.com/marceloneppel/rethinkdb.git

Or if you are a developer:

dependencies:
  rethinkdb_dart:
    path: /path/to/your/cloned/rethinkdb_dart

Then import the package into your project:

import 'package:rethinkdb_dart/rethinkdb_dart.dart';

Connect to the database:

var connection = await r.connect(db: "test", host: "localhost", port: 28015);

Create a table:

await r.db('test').tableCreate('tv_shows').run(connection);

Insert some data:

await r.table('tv_shows').insert([
      {'name': 'Star Trek TNG', 'episodes': 178},
      {'name': 'Battlestar Galactica', 'episodes': 75}
    ]).run(connection);

And work with the data:

var count = await r.table('tv_shows').count();
print("count: $count");

To update protobuf execute the following command from the project root:

bash lib/src/generated/regenerate-proto.sh

To run tests execute the following command from the project root:

warning: tests are run against a live database, but they do attempt to clean up after themselves

pub run test  

所属分类

依赖

依赖清单 4 项

源码仓库

使用此插件的项目

暂无相关数据。