Search packages, repositories and app categories

GitHub repositoryG0mb/rethink_db

rethink_db

Rethinkdb Flutter Package

rethink_db project cover
Stars
5
Forks
4
Last push (UTC)
Jan 18, 2022
Project status
Active

Original README

English project snapshot. Visit GitHub for the latest content.

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
dependencies:
  rethink_db_ns: ^0.0.4

Install from Github

dependencies:
  rethink_db:
    git: 
      url: git://github.com/G0mb/rethink_db.git
      ref: main

Then import the package into your project:

import 'package:rethink_db_ns/rethink_db_ns.dart';
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);

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

More examples will be added soon...

Unit Test
dart test
Gomb Technology Inc GitHub avatar
GitHub author

Gomb Technology Inc ↗

LanguagesDartShell

Packages published by this repository

Dependencies used

Dependency list 6 items

How do I choose a repository?

Start with your use case, compare repository activity, and check the original project before adopting it.

  1. Search by repository name, owner or description, then narrow the results by topic.
  2. Compare stars, forks and recent pushes. Stars show community interest, not a guarantee of quality.
  3. Read the README, license and issues on GitHub before using a project.

Sources and maintenance

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗