rethinkdb_dart 2.3.2+6 copy "rethinkdb_dart: ^2.3.2+6" to clipboard
rethinkdb_dart: ^2.3.2+6 copied to clipboard

Dart 2 driver for RethinkDB v2.3.

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'
copied to clipboard

Or to use bleeding edge:

dependencies:
  rethinkdb_dart:
    git: git://github.com/marceloneppel/rethinkdb.git
copied to clipboard

Or if you are a developer:

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

Then import the package into your project:

import 'package:rethinkdb_dart/rethinkdb_dart.dart';
copied to clipboard

Connect to the database:

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

Create a table:

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

Insert some data:

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

And work with the data:

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

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

bash lib/src/generated/regenerate-proto.sh
copied to clipboard

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  
copied to clipboard
29
likes
25
points
8
downloads

Publisher

verified publishermarceloneppel.dev

Weekly Downloads

2024.10.22 - 2025.09.16

Dart 2 driver for RethinkDB v2.3.

Repository (GitHub)

Documentation

Documentation

License

MIT (license)

Dependencies

convert, crypto, pbkdf2_dart, protobuf

More

Packages that depend on rethinkdb_dart