FLUTTER ECOSYSTEM

marceloneppel/rethinkdb

RethinkDB 用の Dart 2 および Flutter ドライバー。

rethinkdb のプロジェクト画像
Stars
26
Forks
10
最終プッシュ(UTC)
2021/09/21
プロジェクト状態
公開中
Marcelo Henrique Neppel GitHub avatar
GITHUB User

Marcelo Henrique Neppel ↗

Senior Software Engineer | Rust | Python | Go | Kubernetes | AWS | GCP

@CanonicalSão Bento do Sul - Brazil
言語DartShell

技術トピック

このリポジトリが公開するパッケージ

使用している依存関係

依存関係一覧 6 件

元の README

以下は英語原文のスナップショットです。最新版は GitHub をご覧ください。

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