当前位置: 首页>>代码示例>>C#>>正文


C# ReqlFunction1类代码示例

本文整理汇总了C#中ReqlFunction1的典型用法代码示例。如果您正苦于以下问题:C# ReqlFunction1类的具体用法?C# ReqlFunction1怎么用?C# ReqlFunction1使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ReqlFunction1类属于命名空间,在下文中一共展示了ReqlFunction1类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: group

 internal Group group ( ReqlFunction1 func1, ReqlFunction1 func1A, ReqlFunction1 func1B, Object exprA )
 {
    return Group ( func1, func1A, func1B, exprA );
 }
开发者ID:fjsnogueira,项目名称:RethinkDb.Driver,代码行数:4,代码来源:ReqlExpr.cs

示例2: max

/// <summary>
/// <para>Finds the maximum element of a sequence.</para>
/// </summary>
/// <example><para>Example: Return the maximum value in the list <code>[3, 5, 7]</code>.</para>
/// <code>r.expr([3, 5, 7]).max().run(conn, callback);
/// </code></example>
                        public Max max ( ReqlFunction1 func1 )
                        {
                        Arguments arguments = new Arguments(this);
                                arguments.CoerceAndAdd(func1);
                        return new Max (arguments );
                        }
开发者ID:gitter-badger,项目名称:RethinkDb.Driver,代码行数:12,代码来源:ReqlExpr.cs

示例3: map

/// <summary>
/// <para>Transform each element of one or more sequences by applying a mapping function to them. If <code>map</code> is run with two or more sequences, it will iterate for as many items as there are in the shortest sequence.</para>
///</summary>
/// <example><para>Example: Return the first five squares.</para>
/// <code>r.expr([1, 2, 3, 4, 5]).map(function (val) {
///     return val.mul(val);
/// }).run(conn, callback);
/// // Result passed to callback
/// [1, 4, 9, 16, 25]
/// </code></example>
                    public Map map ( Object expr, ReqlFunction1 func1 )
                    {
                        Arguments arguments = new Arguments();
                        arguments.CoerceAndAdd(expr);
                        arguments.CoerceAndAdd(func1);
                        return new Map (arguments);
                    }
开发者ID:cadabloom,项目名称:RethinkDb.Driver,代码行数:17,代码来源:TopLevel.cs

示例4: group

/// <summary>
/// <para>Takes a stream and partitions it into multiple groups based on the
/// fields or functions provided.  Commands chained after <code>group</code> will be
/// called on each of these grouped sub-streams, producing grouped data.</para>
/// </summary>
/// <example><para>Example: What is each player's best game?</para>
/// <code>r.table('games').group('player').max('points').run(conn, callback)
/// </code></example>
                        public Group group ( ReqlFunction1 func1, ReqlFunction1 func1A, Object exprA, Object exprB )
                        {
                        Arguments arguments = new Arguments(this);
                                arguments.CoerceAndAdd(func1);
                                arguments.CoerceAndAdd(func1A);
                                arguments.CoerceAndAdd(exprA);
                                arguments.CoerceAndAdd(exprB);
                        return new Group (arguments );
                        }
开发者ID:gitter-badger,项目名称:RethinkDb.Driver,代码行数:17,代码来源:ReqlExpr.cs

示例5: sum

/// <summary>
/// <para>Sums all the elements of a sequence.  If called with a field name,
/// sums all the values of that field in the sequence, skipping elements
/// of the sequence that lack that field.  If called with a function,
/// calls that function on every element of the sequence and sums the
/// results, skipping elements of the sequence where that function returns
/// <code>null</code> or a non-existence error.</para>
/// </summary>
/// <example><para>Example: What's 3 + 5 + 7?</para>
/// <code>r.expr([3, 5, 7]).sum().run(conn, callback)
/// </code></example>
                        public Sum sum ( ReqlFunction1 func1 )
                        {
                        Arguments arguments = new Arguments(this);
                                arguments.CoerceAndAdd(func1);
                        return new Sum (arguments );
                        }
开发者ID:gitter-badger,项目名称:RethinkDb.Driver,代码行数:17,代码来源:ReqlExpr.cs

示例6: replace

/// <summary>
/// <para>Replace documents in a table. Accepts a JSON document or a ReQL expression, and replaces
/// the original document with the new one. The new document must have the same primary key
/// as the original document.</para>
/// </summary>
/// <example><para>Example: Replace the document with the primary key <code>1</code>.</para>
/// <code>r.table("posts").get(1).replace({
///     id: 1,
///     title: "Lorem ipsum",
///     content: "Aleas jacta est",
///     status: "draft"
/// }).run(conn, callback)
/// </code></example>
                        public Replace replace ( ReqlFunction1 func1 )
                        {
                        Arguments arguments = new Arguments(this);
                                arguments.CoerceAndAdd(func1);
                        return new Replace (arguments );
                        }
开发者ID:gitter-badger,项目名称:RethinkDb.Driver,代码行数:19,代码来源:ReqlExpr.cs

示例7: forEach

/// <summary>
/// <para>Loop over a sequence, evaluating the given write query for each element.</para>
/// </summary>
/// <example><para>Example: Now that our heroes have defeated their villains, we can safely remove them from the villain table.</para>
/// <code>r.table('marvel').forEach(function(hero) {
///     return r.table('villains').get(hero('villainDefeated')).delete()
/// }).run(conn, callback)
/// </code></example>
                        public ForEach forEach ( ReqlFunction1 func1 )
                        {
                        Arguments arguments = new Arguments(this);
                                arguments.CoerceAndAdd(func1);
                        return new ForEach (arguments );
                        }
开发者ID:gitter-badger,项目名称:RethinkDb.Driver,代码行数:14,代码来源:ReqlExpr.cs

示例8: contains

/// <summary>
/// <para>Returns whether or not a sequence contains all the specified values, or if functions are
/// provided instead, returns whether or not a sequence contains values matching all the
/// specified functions.</para>
/// </summary>
/// <example><para>Example: Has Iron Man ever fought Superman?</para>
/// <code>r.table('marvel').get('ironman')('opponents').contains('superman').run(conn, callback)
/// </code></example>
                        public Contains contains ( ReqlFunction1 func1, ReqlFunction1 func1A, ReqlFunction1 func1B, ReqlFunction1 func1C )
                        {
                        Arguments arguments = new Arguments(this);
                                arguments.CoerceAndAdd(func1);
                                arguments.CoerceAndAdd(func1A);
                                arguments.CoerceAndAdd(func1B);
                                arguments.CoerceAndAdd(func1C);
                        return new Contains (arguments );
                        }
开发者ID:gitter-badger,项目名称:RethinkDb.Driver,代码行数:17,代码来源:ReqlExpr.cs

示例9: merge

/// <summary>
/// <para>Merge two or more objects together to construct a new object with properties from all. When there is a conflict between field names, preference is given to fields in the rightmost object in the argument list.</para>
/// </summary>
/// <example><para>Example: Equip Thor for battle.</para>
/// <code>r.table('marvel').get('thor').merge(
///     r.table('equipment').get('hammer'),
///     r.table('equipment').get('pimento_sandwich')
/// ).run(conn, callback)
/// </code></example>
                        public Merge merge ( ReqlFunction1 func1, ReqlFunction1 func1A, Object exprA, Object exprB )
                        {
                        Arguments arguments = new Arguments(this);
                                arguments.CoerceAndAdd(func1);
                                arguments.CoerceAndAdd(func1A);
                                arguments.CoerceAndAdd(exprA);
                                arguments.CoerceAndAdd(exprB);
                        return new Merge (arguments );
                        }
开发者ID:gitter-badger,项目名称:RethinkDb.Driver,代码行数:18,代码来源:ReqlExpr.cs

示例10: min

 internal Min min ( ReqlFunction1 func1 )
 {
    return Min ( func1 );
 }
开发者ID:fjsnogueira,项目名称:RethinkDb.Driver,代码行数:4,代码来源:ReqlExpr.cs

示例11: max

 internal Max max ( ReqlFunction1 func1 )
 {
    return Max ( func1 );
 }
开发者ID:fjsnogueira,项目名称:RethinkDb.Driver,代码行数:4,代码来源:ReqlExpr.cs

示例12: avg

 internal Avg avg ( ReqlFunction1 func1 )
 {
    return Avg ( func1 );
 }
开发者ID:fjsnogueira,项目名称:RethinkDb.Driver,代码行数:4,代码来源:ReqlExpr.cs

示例13: sum

 internal Sum sum ( ReqlFunction1 func1 )
 {
    return Sum ( func1 );
 }
开发者ID:fjsnogueira,项目名称:RethinkDb.Driver,代码行数:4,代码来源:ReqlExpr.cs

示例14: eqJoin

/// <summary>
/// <para>Join tables using a field or function on the left-hand sequence matching primary keys or secondary indexes on the right-hand table. <code>eqJoin</code> is more efficient than other ReQL join types, and operates much faster. Documents in the result set consist of pairs of left-hand and right-hand documents, matched when the field on the left-hand side exists and is non-null and an entry with that field's value exists in the specified index on the right-hand side.</para>
/// <para>Example: Match players with the games they've played against one another.</para>
/// <para><code>js
/// r.table('players').eqJoin('gameId', r.table('games')).run(conn, callback)</code></para>
/// </summary>
/// <example></example>
                        public EqJoin eqJoin ( ReqlFunction1 func1, Object exprA )
                        {
                        Arguments arguments = new Arguments(this);
                                arguments.CoerceAndAdd(func1);
                                arguments.CoerceAndAdd(exprA);
                        return new EqJoin (arguments );
                        }
开发者ID:gitter-badger,项目名称:RethinkDb.Driver,代码行数:14,代码来源:ReqlExpr.cs

示例15: update

/// <summary>
/// <para>Update JSON documents in a table. Accepts a JSON document, a ReQL expression, or a
/// combination of the two. You can pass options like <code>returnChanges</code> that will return the old
/// and new values of the row you have modified.</para>
/// </summary>
/// <example><para>Example: Update the status of the post with <code>id</code> of <code>1</code> to <code>published</code>.</para>
/// <code>r.table("posts").get(1).update({status: "published"}).run(conn, callback)
/// </code></example>
                        public Update update ( ReqlFunction1 func1 )
                        {
                        Arguments arguments = new Arguments(this);
                                arguments.CoerceAndAdd(func1);
                        return new Update (arguments );
                        }
开发者ID:gitter-badger,项目名称:RethinkDb.Driver,代码行数:14,代码来源:ReqlExpr.cs


注:本文中的ReqlFunction1类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。