Esempio n. 1
0
        /// <summary>
        /// Searches through the current <see cref="SchemaEntries"/> for a matching column
        /// </summary>
        /// <param name="columnName">The name of the column to retrieve the SchemaItem for</param>
        /// <returns>A SchemaItem that matches the columnName, or null for no matches</returns>
        public virtual SchemaItem FindSchemaItem(string columnName)
        {
            if (this.SchemaEntries.Count == 0)
            {
                return(null);
            }

            for (int i = 0; i < this.SchemaEntries.Count; i++)
            {
                SchemaItem si = (SchemaItem)this.SchemaEntries[i];
                if (si.FieldName == columnName)
                {
                    return(si);
                }
            }

            return(null);
        }
Esempio n. 2
0
 /// <summary>
 /// Initializes a new instance of <see cref="ValueParameter"/>.
 /// </summary>
 /// <param name="item">A <see cref="SchemaItem"/> for the parameter</param>
 public ValueParameter(SchemaItem item)
 {
     this._schemaItem = item;
     this._column     = item.FieldName;
 }
 /// <summary>
 /// This is only called internally by the EasyObject architecture.
 /// </summary>
 /// <param name="item">The SchemaItem associated with the WhereParameter</param>
 public WhereParameter(SchemaItem item) : base(item)
 {
     this._operator = Operand.Equal;
 }
 /// <summary>
 /// This is only called by EasyObject architecture.
 /// </summary>
 /// <param name="item">A <see cref="SchemaItem"/> to use in the aggregate</param>
 public AggregateParameter(SchemaItem item) : base(item)
 {
     this._alias    = item.FieldName;
     this._distinct = false;
     this._function = AggregateParameter.Func.Sum;
 }