How to use the rethinkdb-ts.r.branch function in rethinkdb-ts

To help you get started, we’ve selected a few rethinkdb-ts examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github rethinkdb / rethinkdb-desktop / app / main / db / queries / table.js View on Github external
.do(servers => {
      return r.branch(
        servers.isEmpty(),
        r.error('No server is connected'),
        servers
          .sample(1)
          .nth(0)('name')
          .do(server => {
            return r
              .db(SYSTEM_DB)
              .table('table_config')
              .insert(
                {
                  db,
                  name,
                  primary_key: primaryKey,
                  durability,
                  shards: [

rethinkdb-ts

RethinkDB TypeScript driver

Apache-2.0
Latest version published 6 months ago

Package Health Score

70 / 100
Full package analysis

Similar packages