Пример #1
0
/// <summary>
/// <para>Test if two values are not equal.</para>
/// </summary>
/// <example><para>Example: Does 2 not equal 2?</para>
/// <code>r.expr(2).ne(2).run(conn, callback)
/// </code></example>
                        public Ne ne ( Object exprA, params object[] exprs )
                        {
                        Arguments arguments = new Arguments(this);
                                arguments.CoerceAndAdd(exprA);
                                arguments.CoerceAndAddAll(exprs);
                        return new Ne (arguments );
                        }
Пример #2
0
/// <summary>
/// <para>The opposite of pluck; takes an object or a sequence of objects, and returns them with
/// the specified paths removed.</para>
/// </summary>
/// <example><para>Example: Since we don't need it for this computation we'll save bandwidth and leave
/// out the list of IronMan's romantic conquests.</para>
/// <code>r.table('marvel').get('IronMan').without('personalVictoriesList').run(conn, callback)
/// </code></example>
                        public Without without ( params object[] exprs )
                        {
                        Arguments arguments = new Arguments(this);
                                arguments.CoerceAndAddAll(exprs);
                        return new Without (arguments );
                        }
Пример #3
0
/// <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 ( params object[] exprs )
                        {
                        Arguments arguments = new Arguments(this);
                                arguments.CoerceAndAddAll(exprs);
                        return new And (arguments );
                        }
Пример #4
0
/// <summary>
/// <para>Get all documents where the given value matches the value of the requested index.</para>
/// </summary>
/// <example><para>Example: Secondary index keys are not guaranteed to be unique so we cannot query via <a href="/api/javascript/get/">get</a> when using a secondary index.</para>
/// <code>r.table('marvel').getAll('man_of_steel', {index:'code_name'}).run(conn, callback)
/// </code></example>
                            /// <param name="args">Same as calling params object[] overload, except the collection is applied as object[] params.</param>
                            public GetAll GetAll ( ICollection<Guid> args )
                            {
                                var arguments = new Arguments(this);
                                arguments.CoerceAndAddAll(args);
                                return new GetAll (arguments);
                            }
Пример #5
0
/// <summary>
/// <para>Plucks out one or more attributes from either an object or a sequence of objects
/// (projection).</para>
/// </summary>
/// <example><para>Example: We just need information about IronMan's reactor and not the rest of the
/// document.</para>
/// <code>r.table('marvel').get('IronMan').pluck('reactorState', 'reactorPower').run(conn, callback)
/// </code></example>
                        public Pluck pluck ( params object[] exprs )
                        {
                        Arguments arguments = new Arguments(this);
                                arguments.CoerceAndAddAll(exprs);
                        return new Pluck (arguments );
                        }
Пример #6
0
/// <summary>
/// <para>Concatenate two or more sequences.</para>
///</summary>
/// <example><para>Example: Construct a stream of all heroes.</para>
/// <code>r.table('marvel').union(r.table('dc')).run(conn, callback);
/// </code></example>
                    public Union union ( params object[] exprs )
                    {
                        Arguments arguments = new Arguments();
                        arguments.CoerceAndAddAll(exprs);
                        return new Union (arguments);
                    }
Пример #7
0
/// <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);
                    }
Пример #8
0
/// <summary>
/// <para>Test if an object has one or more fields. An object has a field if it has that key and the key has a non-null value. For instance, the object <code>{'a': 1,'b': 2,'c': null}</code> has the fields <code>a</code> and <code>b</code>.</para>
/// </summary>
/// <example><para>Example: Return the players who have won games.</para>
/// <code>r.table('players').hasFields('games_won').run(conn, callback)
/// </code></example>
                            /// <param name="args">Same as calling params object[] overload, except the collection is applied as object[] params.</param>
                            public HasFields HasFields ( ICollection<string> args )
                            {
                                var arguments = new Arguments(this);
                                arguments.CoerceAndAddAll(args);
                                return new HasFields (arguments);
                            }
Пример #9
0
/// <summary>
/// <para>Plucks out one or more attributes from either an object or a sequence of objects
/// (projection).</para>
/// </summary>
/// <example><para>Example: We just need information about IronMan's reactor and not the rest of the
/// document.</para>
/// <code>r.table('marvel').get('IronMan').pluck('reactorState', 'reactorPower').run(conn, callback)
/// </code></example>
                            /// <param name="args">Same as calling params object[] overload, except the collection is applied as object[] params.</param>
                            public Pluck Pluck ( ICollection<string> args )
                            {
                                var arguments = new Arguments(this);
                                arguments.CoerceAndAddAll(args);
                                return new Pluck (arguments);
                            }
Пример #10
0
/// <summary>
/// <para>Perform a branching conditional equivalent to <code>if-then-else</code>.</para>
/// <para>The <code>branch</code> command takes 2n+1 arguments: pairs of conditional expressions and commands to be executed if the conditionals return any value but <code>false</code> or <code>null</code> (i.e., "truthy" values), with a final "else" command to be evaluated if all of the conditionals are <code>false</code> or <code>null</code>.</para>
///</summary>
/// <example><para>Example: Test the value of x.</para>
/// <code>var x = 10;
/// r.branch(r.expr(x).gt(5), 'big', 'small').run(conn, callback);
/// // Result passed to callback
/// "big"
/// </code></example>
                            public Branch Branch ( Object expr, Object exprA, Object exprB, params object[] exprs )
                            {
                                Arguments arguments = new Arguments();
                                arguments.CoerceAndAdd(expr);
                                arguments.CoerceAndAdd(exprA);
                                arguments.CoerceAndAdd(exprB);
                                arguments.CoerceAndAddAll(exprs);
                                return new Branch (arguments);
                            }
Пример #11
0
/// <summary>
/// <para>Compute the logical "or" of one 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 ( params object[] exprs )
                            {
                                Arguments arguments = new Arguments();
                                arguments.CoerceAndAddAll(exprs);
                                return new Or (arguments);
                            }
Пример #12
0
/// <summary>
/// <para>Wait for the specified indexes on this table to be ready, or for all
/// indexes on this table to be ready if no indexes are specified.</para>
/// </summary>
/// <example><para>Example: Wait for all indexes on the table <code>test</code> to be ready:</para>
/// <code>r.table('test').indexWait().run(conn, callback)
/// </code>
/// <para>Example: Wait for the index <code>timestamp</code> to be ready:</para>
/// <code>r.table('test').indexWait('timestamp').run(conn, callback)
/// </code></example>
                    public IndexWait indexWait ( params object[] exprs )
                    {
                        Arguments arguments = new Arguments(this);
                        arguments.CoerceAndAddAll(exprs);
                        return new IndexWait (arguments);
                    }
Пример #13
0
/// <summary>
/// <para>Get all documents where the given value matches the value of the requested index.</para>
/// </summary>
/// <example><para>Example: Secondary index keys are not guaranteed to be unique so we cannot query via <a href="/api/javascript/get/">get</a> when using a secondary index.</para>
/// <code>r.table('marvel').getAll('man_of_steel', {index:'code_name'}).run(conn, callback)
/// </code></example>
                    public GetAll getAll ( params object[] exprs )
                    {
                        Arguments arguments = new Arguments(this);
                        arguments.CoerceAndAddAll(exprs);
                        return new GetAll (arguments);
                    }
Пример #14
0
/// <summary>
/// <para>Wait for the specified indexes on this table to be ready, or for all
/// indexes on this table to be ready if no indexes are specified.</para>
/// </summary>
/// <example><para>Example: Wait for all indexes on the table <code>test</code> to be ready:</para>
/// <code>r.table('test').indexWait().run(conn, callback)
/// </code></example>
                            /// <param name="args">Same as calling params object[] overload, except the collection is applied as object[] params.</param>
                            public IndexWait IndexWait ( ICollection<string> args )
                            {
                                var arguments = new Arguments(this);
                                arguments.CoerceAndAddAll(args);
                                return new IndexWait (arguments);
                            }
Пример #15
0
/// <summary>
/// <para>Construct a geometry object of type Polygon. The Polygon can be specified in one of two ways:</para>
/// <ul>
/// <li>Three or more two-item arrays, specifying longitude and latitude numbers of the polygon's vertices;</li>
/// <li>Three or more <a href="/api/javascript/point">Point</a> objects specifying the polygon's vertices.</li>
/// </ul>
///</summary>
/// <example><para>Example: Define a polygon.</para>
/// <code>r.table('geo').insert({
///     id: 101,
///     rectangle: r.polygon(
///         [-122.423246,37.779388],
///         [-122.423246,37.329898],
///         [-121.886420,37.329898],
///         [-121.886420,37.779388]
///     )
/// }).run(conn, callback);
/// </code></example>
                    public Polygon polygon ( Object expr, Object exprA, Object exprB, params object[] exprs )
                    {
                        Arguments arguments = new Arguments();
                        arguments.CoerceAndAdd(expr);
                        arguments.CoerceAndAdd(exprA);
                        arguments.CoerceAndAdd(exprB);
                        arguments.CoerceAndAddAll(exprs);
                        return new Polygon (arguments);
                    }
Пример #16
0
/// <summary>
/// <para>The opposite of pluck; takes an object or a sequence of objects, and returns them with
/// the specified paths removed.</para>
/// </summary>
/// <example><para>Example: Since we don't need it for this computation we'll save bandwidth and leave
/// out the list of IronMan's romantic conquests.</para>
/// <code>r.table('marvel').get('IronMan').without('personalVictoriesList').run(conn, callback)
/// </code></example>
                            /// <param name="args">Same as calling params object[] overload, except the collection is applied as object[] params.</param>
                            public Without Without ( ICollection<string> args )
                            {
                                var arguments = new Arguments(this);
                                arguments.CoerceAndAddAll(args);
                                return new Without (arguments);
                            }
Пример #17
0
/// <summary>
/// <para>Creates an object from a list of key-value pairs, where the keys must
/// be strings.  <code>r.object(A, B, C, D)</code> is equivalent to
/// <code>r.expr([[A, B], [C, D]]).coerce_to('OBJECT')</code>.</para>
///</summary>
/// <example><para>Example: Create a simple object.</para>
/// <code>r.object('id', 5, 'data', ['foo', 'bar']).run(conn, callback)
/// </code></example>
                    public ReqlObject object_ ( params object[] exprs )
                    {
                        Arguments arguments = new Arguments();
                        arguments.CoerceAndAddAll(exprs);
                        return new ReqlObject (arguments);
                    }
Пример #18
0
 public Funcall Do_ ( params object[] exprs )
 {
     Arguments arguments = new Arguments(this);
     arguments.CoerceAndAddAll(exprs);
     return new Funcall (arguments );
 }
Пример #19
0
 public Funcall do_ ( Object expr, params object[] exprs )
 {
     Arguments arguments = new Arguments();
     arguments.CoerceAndAdd(expr);
     arguments.CoerceAndAddAll(exprs);
     return new Funcall (arguments);
 }
Пример #20
0
/// <summary>
/// <para>Test if an object has one or more fields. An object has a field if it has that key and the key has a non-null value. For instance, the object <code>{'a': 1,'b': 2,'c': null}</code> has the fields <code>a</code> and <code>b</code>.</para>
/// </summary>
/// <example><para>Example: Return the players who have won games.</para>
/// <code>r.table('players').hasFields('games_won').run(conn, callback)
/// </code></example>
                        public HasFields hasFields ( params object[] exprs )
                        {
                        Arguments arguments = new Arguments(this);
                                arguments.CoerceAndAddAll(exprs);
                        return new HasFields (arguments );
                        }
Пример #21
0
/// <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);
                    }
Пример #22
0
/// <summary>
/// <para>Sort the sequence by document values of the given key(s). To specify
/// the ordering, wrap the attribute with either <code>r.asc</code> or <code>r.desc</code>
/// (defaults to ascending).</para>
/// <para>Sorting without an index requires the server to hold the sequence in
/// memory, and is limited to 100,000 documents (or the setting of the <code>arrayLimit</code> option for <a href="/api/javascript/run">run</a>). Sorting with an index can
/// be done on arbitrarily large tables, or after a <code>between</code> command
/// using the same index.</para>
/// </summary>
/// <example><para>Example: Order all the posts using the index <code>date</code>.   </para>
/// <code>r.table('posts').orderBy({index: 'date'}).run(conn, callback)
/// </code>
/// <para>The index must have been previously created with <a href="/api/javascript/index_create/">indexCreate</a>.</para>
/// <code>r.table('posts').indexCreate('date').run(conn, callback)
/// </code>
/// <para>You can also select a descending ordering:</para>
/// <code>r.table('posts').orderBy({index: r.desc('date')}).run(conn, callback)
/// </code></example>
                    public OrderBy orderBy ( params object[] exprs )
                    {
                        Arguments arguments = new Arguments(this);
                        arguments.CoerceAndAddAll(exprs);
                        return new OrderBy (arguments);
                    }