rethink_db_ns

Creator: coderz1093

Last updated:

Add to Cart

Description:

rethink db ns

RethinkDB Driver for Dart/Flutter #
This is a fork of Dart 2 and Flutter RethinkDB Driver with null safety 💪🏼 support and less dependencies.
Getting Started #
Install Package #

Install from Pub

dart pub add rethink_db_ns
# or
flutter pub add rethink_db_ns
copied to clipboard
dependencies:
rethink_db_ns: ^0.0.4
copied to clipboard

Install from Github

dependencies:
rethink_db:
git:
url: git://github.com/G0mb/rethink_db.git
ref: main
copied to clipboard
Then import the package into your project:
import 'package:rethink_db_ns/rethink_db_ns.dart';
copied to clipboard
Example #
RethinkDb r = RethinkDb();

final connection = await r.connection(
db: 'test',
host: 'localhost',
port: 28015,
user: 'admin',
password: '',
);

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

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

// Fetch data
var result = await r.table('tv_shows').get(1).run(connection);
copied to clipboard

I recommend reviewing the RethinkDB Documentation for other types of queries.

More examples will be added soon...
Unit Test #
dart test
copied to clipboard

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files:

Customer Reviews

There are no reviews.