Giter Club home page Giter Club logo

rethinkdb.driver's Introduction

Build status

RethinkDb.Driver

Project Description

A RethinkDB database driver written in C# with 100% ReQL API compatibility and completeness.

This driver is based on the official Java Driver. The basic mechanics and architecture of both drivers are the same. Except this C# driver is a bit more cool, stylish and kick-ass. ๐Ÿ˜Ž

Standout Features
The Crypto Tip Jar!

Open-Source and Commercial Licensing

This open-source driver is dual-licensed. Please read below about SSL/TLS restrictions.

Commercial License

A commercial license is required if any part of this driver is used to communicate with a RethinkDB (server or proxy) using SSL/TLS encryption. A commercial license is also required if any part of this driver is used to interact with Compose.IO. Commercial licenses are sold by Bit Armory Inc and are available for purchase here. More information about commercial licensing can be found here.

Open-Source License

As long as SSL/TLS is not used when communicating with a RethinkDB (server or proxy), the driver is free to use for commercial and non-commercial applications and is covered under a modified Apache License 2.0.

Getting Help

Commercial Support

Independent commercial support and consulting are available for this driver. To ensure best practices in .NET, proper driver usage, training, and critical bug fixes for the C# driver contact Brian Chavez (twitter, email) for more information.

Community Support

Slack and Discord are the primary means of getting help for free. If your C# related question can't be answered by anyone tag @bchavez in your question.

Download & Install

NuGet Package RethinkDb.Driver

Install-Package RethinkDb.Driver

Supported Runtimes

Windows Linux Mac OS X
.NET Framework v4.5 n/a n/a
.NET Standard All platforms supporting .NET Standard 2.0 or higher.
Eg: .NET Core 2.0.
Mono All platforms 4.0.2 SR2 or higher
RethinkDB server 2.3.0 or higher

Documentation

ReGrid File Storage

Driver Development

RethinkDB Discord Help RethinkDB Gitter Help

Quick Examples

public static RethinkDB R = RethinkDB.R;

[Test]
public void can_connect()
{
    var c = R.Connection()
             .Hostname("192.168.0.11")
             .Port(RethinkDBConstants.DefaultPort)
             .Timeout(60)
             .Connect();

    int result = R.Random(1, 9).Add(R.Random(1, 9)).Run<int>(c);
    Console.WriteLine(result);
    result.Should().BeGreaterOrEqualTo(2).And.BeLessThan(18);
}
// Output: 8

[Test]
public void insert_poco_without_id()
{
    var obj = new Foo { Bar = 1, Baz = 2};
    var result = R.Db("mydb").Table("mytable").Insert(obj).Run(conn);
    result.Dump();
}
/*
    //JObject: Insert Response
	{
	  "deleted": 0,
	  "errors": 0,
	  "generated_keys": [
	    "6931c97f-de3d-46d2-b0f9-956af9517a57"
	  ],
	  "inserted": 1,
	  "replaced": 0,
	  "skipped": 0,
	  "unchanged": 0
	}
*/

[Test]
public void insert_an_array_of_pocos()
{
    var list = new[]
        {
            new Foo {id = "a", Baz = 1, Bar = 1},
            new Foo {id = "b", Baz = 2, Bar = 2},
            new Foo {id = "c", Baz = 3, Bar = 3}
        };
    var result = R.Db("mydb").Table("mytable").Insert(list).Run(conn);
    result.Dump();
}
/*
    //JObject Insert Response
    {
      "deleted": 0,
      "errors": 0,
      "inserted": 3,
      "replaced": 0,
      "skipped": 0,
      "unchanged": 0
    }
*/


[Test]
public void get_a_poco()
{
    Foo foo = R.Db("mydb").Table("mytable").Get("abc").Run<Foo>(conn);
    foo.Dump();
}
//Foo Object
/*
    {
      "id": "abc",
      "Bar": 1,
      "Baz": 2
    }
*/

Contributing

If you'd like to contribute, please consider reading some helpful tips before making changes.

Contributors

Created by Brian Chavez (twitter). Originally ported from the Java Driver by Josh Kuhn. Special thanks to the rest of the RethinkDB team (Josh, AtnNn, danielmewes, neumino, VeXocide) for answering ReQL protocol questions. Also, special thanks to Annie Ruygt for the wonderful GitHub banner!

A big thanks to GitHub and all contributors:

Music Wall

๐ŸŽผ A small collection of videos that helped in the creation of this driver. =)

The Verve Missing Persons Cudi
Kuffdam & Plant NIN Glitch Mob

rethinkdb.driver's People

Contributors

bchavez avatar cadabloom avatar epsitec avatar filllip avatar gjhommersom avatar jjonesrs avatar jrote1 avatar roald-di avatar shalokshalom avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.