Exemplo n.º 1
0
        /// <summary>
        /// Add a dict of key value pairs &lt;string, object&gt; to the existing where part
        /// </summary>
        /// <param name="dict">An existing Dictionary that takes &lt;string, object&gt;</param>
        /// <returns>Query</returns>
        /// <exception cref="ArgumentException">Dupe Key</exception>
        /// <exception cref="ArgumentNullException">Null Argument</exception>
        public IQuery Where(Dictionary <string, object> dict)
        {
            foreach (KeyValuePair <string, object> field in dict)
            {
                WhereMap.Add(field.Key, field.Value);
            }

            return(this);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Clear the Query and anything related
        /// </summary>
        public void Clear()
        {
            // reset all member vars to clean state

            Builder.Clear();
            SelectList.Clear();
            WhereMap.Clear();
            QueryName    = string.Empty;
            AliasName    = string.Empty;
            QueryComment = string.Empty;
            RawQuery     = string.Empty;
            BatchQueryList.Clear();
        }
Exemplo n.º 3
0
        /// <summary>
        /// Sets up the Parameters part of the GraphQL query. This
        /// accepts a key and a where part that will go into the
        /// list for later construction into the query. The where part
        /// can be a simple primitive or complex object that will be
        /// evaluated.
        /// </summary>
        /// <param name="key">The Parameter Name</param>
        /// <param name="where">The value of the parameter, primitive or object</param>
        /// <returns></returns>
        public IQuery Where(string key, object where)
        {
            WhereMap.Add(key, where);

            return(this);
        }