/// <summary> /// <para>Test if the first value is less than other.</para> /// </summary> /// <example><para>Example: Is 2 less than 2?</para> /// <code>r.expr(2).lt(2).run(conn, callback) /// </code></example> public Lt lt ( Object exprA, params object[] exprs ) { Arguments arguments = new Arguments(this); arguments.CoerceAndAdd(exprA); arguments.CoerceAndAddAll(exprs); return new Lt (arguments ); }
/// <summary> /// <para>Gets the type of a value.</para> ///</summary> /// <example><para>Example: Get the type of a string.</para> /// <code>r.expr("foo").typeOf().run(conn, callback) /// </code></example> public TypeOf typeOf_ ( Object expr ) { Arguments arguments = new Arguments(); arguments.CoerceAndAdd(expr); return new TypeOf (arguments); }
/// <summary> /// <para>Grant or deny access permissions for a user account, globally or on a per-database or per-table basis.</para> /// </summary> /// <example><para>Example: Grant the <code>chatapp</code> user account read and write permissions on the <code>users</code> database.</para> /// <code>r.db('users').grant('chatapp', {read: true, write: true}).run(conn, callback); /// /// // Result passed to callback /// { /// "granted": 1, /// "permissions_changes": [ /// { /// "new_val": { "read": true, "write": true }, /// "old_val": { null } /// } /// ] /// </code></example> public Grant Grant ( Object expr, Object exprA ) { Arguments arguments = new Arguments(this); arguments.CoerceAndAdd(expr); arguments.CoerceAndAdd(exprA); return new Grant (arguments ); }
/// <summary> /// <para>Replace an object in a field instead of merging it with an existing object in a <code>merge</code> or <code>update</code> operation.</para> /// <para><code>js /// r.table('users').get(1).update({ data: r.literal({ age: 19, job: 'Engineer' }) }).run(conn, callback)</code></para> ///</summary> /// <example></example> public Literal literal ( Object expr ) { Arguments arguments = new Arguments(); arguments.CoerceAndAdd(expr); return new Literal (arguments); }
/// <summary> /// <para>Reference a database.</para> ///</summary> /// <example><para>Example: Explicitly specify a database for a query.</para> /// <code>r.db('heroes').table('marvel').run(conn, callback) /// </code></example> public Db db ( Object expr ) { Arguments arguments = new Arguments(); arguments.CoerceAndAdd(expr); return new Db (arguments); }
/// <summary> /// <para>Create a time object based on an ISO 8601 date-time string (e.g. '2013-01-01T01:01:01+00:00'). We support all valid ISO 8601 formats except for week dates. If you pass an ISO 8601 date-time without a time zone, you must specify the time zone with the <code>defaultTimezone</code> argument. Read more about the ISO 8601 format at <a href="http://en.wikipedia.org/wiki/ISO_8601">Wikipedia</a>.</para> ///</summary> /// <example><para>Example: Update the time of John's birth.</para> /// <code>r.table("user").get("John").update({birth: r.ISO8601('1986-11-03T08:30:00-07:00')}).run(conn, callback) /// </code></example> public Iso8601 iso8601 ( Object expr ) { Arguments arguments = new Arguments(); arguments.CoerceAndAdd(expr); return new Iso8601 (arguments); }
/// <summary> /// <para>Get information about a ReQL value.</para> ///</summary> /// <example><para>Example: Get information about a table such as primary key, or cache size.</para> /// <code>r.table('marvel').info().run(conn, callback) /// </code></example> public Info info ( Object expr ) { Arguments arguments = new Arguments(); arguments.CoerceAndAdd(expr); return new Info (arguments); }
/// <summary> /// <para>Compute the logical "and" of two or more values.</para> ///</summary> /// <example><para>Example: Return whether both <code>a</code> and <code>b</code> evaluate to true.</para> /// <code>var a = true, b = false; /// r.expr(a).and(b).run(conn, callback); /// // result passed to callback /// false /// </code></example> public And and ( Object expr, params object[] exprs ) { Arguments arguments = new Arguments(); arguments.CoerceAndAdd(expr); arguments.CoerceAndAddAll(exprs); return new And (arguments); }
/// <summary> /// <para>Reconfigure a table's sharding and replication.</para> ///</summary> /// <example><para>Example: Reconfigure a table.</para> /// <code>> r.table('superheroes').reconfigure({shards: 2, replicas: 1}).run(conn, callback); /// </code></example> public Reconfigure reconfigure ( Table table ) { Arguments arguments = new Arguments(); arguments.CoerceAndAdd(table); return new Reconfigure (arguments); }
/// <summary> /// <para>Wait for a table or all the tables in a database to be ready. A table may be temporarily unavailable after creation, rebalancing or reconfiguring. The <code>wait</code> command blocks until the given table (or database) is fully up to date.</para> ///</summary> /// <example><para>Example: Wait for a table to be ready.</para> /// <code>> r.table('superheroes').wait().run(conn, callback); /// </code></example> public Wait wait_ ( Db db ) { Arguments arguments = new Arguments(); arguments.CoerceAndAdd(db); return new Wait (arguments); }
/// <summary> /// <para>Retrieve data from the specified URL over HTTP. The return type depends on the <code>resultFormat</code> option, which checks the <code>Content-Type</code> of the response by default.</para> ///</summary> /// <example><para>Example: Perform a simple HTTP <code>GET</code> request, and store the result in a table.</para> /// <code>r.table('posts').insert(r.http('http://httpbin.org/get')).run(conn, callback) /// </code></example> public Http http ( Object expr ) { Arguments arguments = new Arguments(); arguments.CoerceAndAdd(expr); return new Http (arguments); }
/// <summary> /// <para>Wait for a table or all the tables in a database to be ready. A table may be temporarily unavailable after creation, rebalancing or reconfiguring. The <code>wait</code> command blocks until the given table (or database) is fully up to date.</para> ///</summary> /// <example><para>Example: Wait for a table to be ready.</para> /// <code>> r.table('superheroes').wait().run(conn, callback); /// </code></example> public Wait wait_ ( Table table ) { Arguments arguments = new Arguments(); arguments.CoerceAndAdd(table); return new Wait (arguments); }
/// <summary> /// <para>List all table names in a database. The result is a list of strings.</para> ///</summary> /// <example><para>Example: List all tables of the 'test' database.</para> /// <code>r.db('test').tableList().run(conn, callback) /// </code></example> public TableList tableList ( Db db ) { Arguments arguments = new Arguments(); arguments.CoerceAndAdd(db); return new TableList (arguments); }
/// <summary> /// <para>Drop a table. The table and all its data will be deleted.</para> ///</summary> /// <example><para>Example: Drop a table named 'dc_universe'.</para> /// <code>r.db('test').tableDrop('dc_universe').run(conn, callback) /// </code></example> public TableDrop tableDrop ( Db db, Object expr ) { Arguments arguments = new Arguments(); arguments.CoerceAndAdd(db); arguments.CoerceAndAdd(expr); return new TableDrop (arguments); }
/// <summary> /// <para>Create a database. A RethinkDB database is a collection of tables, similar to /// relational databases.</para> /// <para>If successful, the operation returns an object: <code>{created: 1}</code>. If a database with the /// same name already exists the operation throws <code>RqlRuntimeError</code>.</para> /// <para>Note: that you can only use alphanumeric characters and underscores for the database name.</para> ///</summary> /// <example><para>Example: Create a database named 'superheroes'.</para> /// <code>r.dbCreate('superheroes').run(conn, callback) /// </code></example> public DbCreate dbCreate ( Object expr ) { Arguments arguments = new Arguments(); arguments.CoerceAndAdd(expr); return new DbCreate (arguments); }
/// <summary> /// <para>Compute the logical "or" of two or more values.</para> ///</summary> /// <example><para>Example: Return whether either <code>a</code> or <code>b</code> evaluate to true.</para> /// <code>var a = true, b = false; /// r.expr(a).or(b).run(conn, callback); /// // result passed to callback /// true /// </code></example> public Or or ( Object expr, Object exprA, params object[] exprs ) { Arguments arguments = new Arguments(); arguments.CoerceAndAdd(expr); arguments.CoerceAndAdd(exprA); arguments.CoerceAndAddAll(exprs); return new Or (arguments); }
/// <summary> /// <para>Throw a runtime error. If called with no arguments inside the second argument to <code>default</code>, re-throw the current error.</para> ///</summary> /// <example><para>Example: Iron Man can't possibly have lost a battle:</para> /// <code>r.table('marvel').get('IronMan').do(function(ironman) { /// return r.branch(ironman('victories').lt(ironman('battles')), /// r.error('impossible code path'), /// ironman) /// }).run(conn, callback) /// </code></example> public Error error ( Object expr ) { Arguments arguments = new Arguments(); arguments.CoerceAndAdd(expr); return new Error (arguments); }
/// <summary> /// <para>Reconfigure a table's sharding and replication.</para> ///</summary> /// <example><para>Example: Reconfigure a table.</para> /// <code>> r.table('superheroes').reconfigure({shards: 2, replicas: 1}).run(conn, callback); /// </code></example> public Reconfigure reconfigure ( Db db ) { Arguments arguments = new Arguments(); arguments.CoerceAndAdd(db); return new Reconfigure (arguments); }
public Desc desc ( Object expr ) { Arguments arguments = new Arguments(); arguments.CoerceAndAdd(expr); return new Desc (arguments); }
/// <summary> /// <para>Rebalances the shards of a table. When called on a database, all the tables in that database will be rebalanced.</para> ///</summary> /// <example><para>Example: Rebalance a table.</para> /// <code>> r.table('superheroes').rebalance().run(conn, callback); /// </code></example> public Rebalance rebalance ( Db db ) { Arguments arguments = new Arguments(); arguments.CoerceAndAdd(db); return new Rebalance (arguments); }
/// <summary> /// <para>Parse a JSON string on the server.</para> ///</summary> /// <example><para>Example: Send an array to the server.</para> /// <code>r.json("[1,2,3]").run(conn, callback) /// </code></example> public Json json ( Object expr ) { Arguments arguments = new Arguments(); arguments.CoerceAndAdd(expr); return new Json (arguments); }
/// <summary> /// <para>Rebalances the shards of a table. When called on a database, all the tables in that database will be rebalanced.</para> ///</summary> /// <example><para>Example: Rebalance a table.</para> /// <code>> r.table('superheroes').rebalance().run(conn, callback); /// </code></example> public Rebalance rebalance ( Table table ) { Arguments arguments = new Arguments(); arguments.CoerceAndAdd(table); return new Rebalance (arguments); }
/// <summary> /// <para>Create a time object based on seconds since epoch. The first argument is a double and /// will be rounded to three decimal places (millisecond-precision).</para> ///</summary> /// <example><para>Example: Update the birthdate of the user "John" to November 3rd, 1986.</para> /// <code>r.table("user").get("John").update({birthdate: r.epochTime(531360000)}) /// .run(conn, callback) /// </code></example> public EpochTime epochTime ( Object expr ) { Arguments arguments = new Arguments(); arguments.CoerceAndAdd(expr); return new EpochTime (arguments); }
public Funcall do_ ( Object expr, params object[] exprs ) { Arguments arguments = new Arguments(); arguments.CoerceAndAdd(expr); arguments.CoerceAndAddAll(exprs); return new Funcall (arguments); }
/// <summary> /// <para>Create a time object for a specific time.</para> /// <para>A few restrictions exist on the arguments:</para> /// <ul> /// <li><code>year</code> is an integer between 1400 and 9,999.</li> /// <li><code>month</code> is an integer between 1 and 12.</li> /// <li><code>day</code> is an integer between 1 and 31.</li> /// <li><code>hour</code> is an integer.</li> /// <li><code>minutes</code> is an integer.</li> /// <li><code>seconds</code> is a double. Its value will be rounded to three decimal places /// (millisecond-precision).</li> /// <li><code>timezone</code> can be <code>'Z'</code> (for UTC) or a string with the format <code>±[hh]:[mm]</code>.</li> /// </ul> ///</summary> /// <example><para>Example: Update the birthdate of the user "John" to November 3rd, 1986 UTC.</para> /// <code>r.table("user").get("John").update({birthdate: r.time(1986, 11, 3, 'Z')}) /// .run(conn, callback) /// </code></example> public Time time ( Object expr, Object exprA, Object exprB, Object exprC, Object exprD, Object exprE, Object exprF ) { Arguments arguments = new Arguments(); arguments.CoerceAndAdd(expr); arguments.CoerceAndAdd(exprA); arguments.CoerceAndAdd(exprB); arguments.CoerceAndAdd(exprC); arguments.CoerceAndAdd(exprD); arguments.CoerceAndAdd(exprE); arguments.CoerceAndAdd(exprF); return new Time (arguments); }
public Funcall do_ ( Object expr, Object exprA, ReqlFunction2 func2 ) { Arguments arguments = new Arguments(); arguments.CoerceAndAdd(expr); arguments.CoerceAndAdd(exprA); arguments.CoerceAndAdd(func2); return new Funcall (arguments); }
/// <summary> /// <para>Generate a random number between given (or implied) bounds. <code>random</code> takes zero, one or two arguments.</para> ///</summary> /// <example><para>Example: Generate a random number in the range <code>[0,1)</code></para> /// <code>r.random().run(conn, callback) /// </code></example> public Random random ( Object expr ) { Arguments arguments = new Arguments(); arguments.CoerceAndAdd(expr); return new Random (arguments); }
public Funcall do_ ( Object expr, Object exprA, Object exprB, Object exprC, ReqlFunction4 func4 ) { Arguments arguments = new Arguments(); arguments.CoerceAndAdd(expr); arguments.CoerceAndAdd(exprA); arguments.CoerceAndAdd(exprB); arguments.CoerceAndAdd(exprC); arguments.CoerceAndAdd(func4); return new Funcall (arguments); }
/// <summary> /// <para>Return all documents in a table. Other commands may be chained after <code>table</code> to return a subset of documents (such as <a href="/api/javascript/get/">get</a> and <a href="/api/javascript/filter/">filter</a>) or perform further processing.</para> /// </summary> /// <example><para>Example: Return all documents in the table 'marvel' of the default database.</para> /// <code>r.table('marvel').run(conn, callback) /// </code></example> public Table Table ( Object expr ) { Arguments arguments = new Arguments(this); arguments.CoerceAndAdd(expr); return new Table (arguments ); }
/// <summary> /// <para>If the <code>test</code> expression returns <code>false</code> or <code>null</code>, the <code>false_branch</code> will be evaluated. /// Otherwise, the <code>true_branch</code> will be evaluated.</para> /// <para>The <code>branch</code> command is effectively an <code>if</code> renamed due to language constraints. /// The type of the result is determined by the type of the branch that gets executed.</para> ///</summary> /// <example><para>Example: Return heroes and superheroes.</para> /// <code>r.table('marvel').map( /// r.branch( /// r.row('victories').gt(100), /// r.row('name').add(' is a superhero'), /// r.row('name').add(' is a hero') /// ) /// ).run(conn, callback) /// </code></example> public Branch branch ( Object expr, Object exprA, Object exprB ) { Arguments arguments = new Arguments(); arguments.CoerceAndAdd(expr); arguments.CoerceAndAdd(exprA); arguments.CoerceAndAdd(exprB); return new Branch (arguments); }