搜尋套件、儲存庫與 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 項

原始碼儲存庫

使用此套件的專案

暫無相關資料。