internal DataExpression(DataTable table, string expression, Type type)
 {
     this.dependency = DataTable.zeroColumns;
     ExpressionParser parser = new ExpressionParser(table);
     parser.LoadExpression(expression);
     this.originalExpression = expression;
     this.expr = null;
     if (expression != null)
     {
         this._storageType = DataStorage.GetStorageType(type);
         if (this._storageType == StorageType.BigInteger)
         {
             throw ExprException.UnsupportedDataType(type);
         }
         this._dataType = type;
         this.expr = parser.Parse();
         this.parsed = true;
         if ((this.expr != null) && (table != null))
         {
             this.Bind(table);
         }
         else
         {
             this.bound = false;
         }
     }
 }
Beispiel #2
0
        internal DataExpression(DataTable table, string expression, Type type)
        {
            this.dependency = DataTable.zeroColumns;
            ExpressionParser parser = new ExpressionParser(table);

            parser.LoadExpression(expression);
            this.originalExpression = expression;
            this.expr = null;
            if (expression != null)
            {
                this._storageType = DataStorage.GetStorageType(type);
                if (this._storageType == StorageType.BigInteger)
                {
                    throw ExprException.UnsupportedDataType(type);
                }
                this._dataType = type;
                this.expr      = parser.Parse();
                this.parsed    = true;
                if ((this.expr != null) && (table != null))
                {
                    this.Bind(table);
                }
                else
                {
                    this.bound = false;
                }
            }
        }
 internal void Bind(DataTable table)
 {
     this.table = table;
     if ((table != null) && (this.expr != null))
     {
         List<DataColumn> list = new List<DataColumn>();
         this.expr.Bind(table, list);
         this.expr = this.expr.Optimize();
         this.table = table;
         this.bound = true;
         this.dependency = list.ToArray();
     }
 }
Beispiel #4
0
 internal void Bind(DataTable table)
 {
     this.table = table;
     if ((table != null) && (this.expr != null))
     {
         List <DataColumn> list = new List <DataColumn>();
         this.expr.Bind(table, list);
         this.expr       = this.expr.Optimize();
         this.table      = table;
         this.bound      = true;
         this.dependency = list.ToArray();
     }
 }