• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# ReqlFunction1类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: filter

/// <summary>
/// <para>Get all the documents for which the given predicate is true.</para>
/// <para><code>filter</code> can be called on a sequence, selection, or a field containing an array of
/// elements. The return type is the same as the type on which the function was called on.</para>
/// <para>The body of every filter is wrapped in an implicit <code>.default(false)</code>, which means that
/// if a non-existence errors is thrown (when you try to access a field that does not exist
/// in a document), RethinkDB will just ignore the document.
/// The <code>default</code> value can be changed by passing an object with a <code>default</code> field.
/// Setting this optional argument to <code>r.error()</code> will cause any non-existence errors to
/// return a <code>RqlRuntimeError</code>.</para>
/// </summary>
/// <example><para>Example: Get all the users that are 30 years old.</para>
/// <code>r.table('users').filter({age: 30}).run(conn, callback)
/// </code></example>
                        public Filter filter ( ReqlFunction1 func1 )
                        {
                        Arguments arguments = new Arguments(this);
                                arguments.CoerceAndAdd(func1);
                        return new Filter (arguments );
                        }
开发者ID:gitter-badger,项目名称:RethinkDb.Driver,代码行数:20,代码来源:ReqlExpr.cs


示例17: do_

 public Funcall do_ ( ReqlFunction1 func1 )
 {
 Arguments arguments = new Arguments(this);
         arguments.CoerceAndAdd(func1);
 return new Funcall (arguments );
 }
开发者ID:gitter-badger,项目名称:RethinkDb.Driver,代码行数:6,代码来源:ReqlExpr.cs


示例18: concatMap

/// <summary>
/// <para>Concatenate one or more elements into a single sequence using a mapping function.</para>
/// </summary>
/// <example><para>Example: Construct a sequence of all monsters defeated by Marvel heroes. The field "defeatedMonsters" is an array of one or more monster names.</para>
/// <code>r.table('marvel').concatMap(function(hero) {
///     return hero('defeatedMonsters')
/// }).run(conn, callback)
/// </code></example>
                        public ConcatMap concatMap ( ReqlFunction1 func1 )
                        {
                        Arguments arguments = new Arguments(this);
                                arguments.CoerceAndAdd(func1);
                        return new ConcatMap (arguments );
                        }
开发者ID:gitter-badger,项目名称:RethinkDb.Driver,代码行数:14,代码来源:ReqlExpr.cs


示例19: default_

/// <summary>
/// <para>Handle non-existence errors. Tries to evaluate and return its first argument. If an
/// error related to the absence of a value is thrown in the process, or if its first
/// argument returns <code>null</code>, returns its second argument. (Alternatively, the second argument
/// may be a function which will be called with either the text of the non-existence error
/// or <code>null</code>.)</para>
/// </summary>
/// <example><para>Example: Suppose we want to retrieve the titles and authors of the table <code>posts</code>.
/// In the case where the author field is missing or <code>null</code>, we want to retrieve the string
/// <code>Anonymous</code>.</para>
/// <code>r.table("posts").map( function(post) {
///     return {
///         title: post("title"),
///         author: post("author").default("Anonymous")
///     }
/// }).run(conn, callback)
/// </code></example>
                        public Default default_ ( ReqlFunction1 func1 )
                        {
                        Arguments arguments = new Arguments(this);
                                arguments.CoerceAndAdd(func1);
                        return new Default (arguments );
                        }
开发者ID:gitter-badger,项目名称:RethinkDb.Driver,代码行数:23,代码来源:ReqlExpr.cs


示例20: offsetsOf

/// <summary>
/// <para>Get the indexes of an element in a sequence. If the argument is a predicate, get the indexes of all elements matching it.</para>
/// </summary>
/// <example><para>Example: Find the position of the letter 'c'.</para>
/// <code>r.expr(['a','b','c']).offsetsOf('c').run(conn, callback)
/// </code></example>
                        public OffsetsOf offsetsOf ( ReqlFunction1 func1 )
                        {
                        Arguments arguments = new Arguments(this);
                                arguments.CoerceAndAdd(func1);
                        return new OffsetsOf (arguments );
                        }
开发者ID:gitter-badger,项目名称:RethinkDb.Driver,代码行数:12,代码来源:ReqlExpr.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Request类代码示例发布时间:2022-05-24
下一篇:
C# RepositoryFactory类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap