Exemplo n.º 1
0
 public HqlField(HqlFieldType type, HqlScalar scalar) // for SCALAR
 {
     if (type != HqlFieldType.SCALAR)
     {
         throw new Exception("Instance is for SCALAR only");
     }
     Init(type);
     _scalar = scalar;
 }
Exemplo n.º 2
0
        private bool MoveNextTokenCheckScalar()
        {
            if (_token.WordType == HqlWordType.KEYWORD && _token.Keyword == HqlKeyword.SCALAR && MatchNext("("))
            {
                HqlScalar scalar = new HqlScalar();
                scalar.Parse(this);
                _token = new HqlToken(HqlWordType.SCALAR, new HqlField(HqlFieldType.SCALAR, scalar));
                return(true);
            }

            return(false);
        }
Exemplo n.º 3
0
 private void VerifyFieldsPresent(HqlScalar scalar)
 {
     if (scalar.HasMultipleFields)
     {
         for (int i = 0; i < scalar.Fields.Length; ++i)
         {
             VerifyFieldsPresent(scalar.Fields[i]);
         }
     }
     else
     {
         VerifyFieldsPresent(scalar.Field);
     }
 }
Exemplo n.º 4
0
        private void LoadField(HqlField field)
        {
            if (field == null)
            {
                return;
            }

            if (!field.ContainsTableReference(TableReference))
            {
                return;
            }

            if (!FieldsImpacted.ContainsField(field))
            {
                FieldsImpacted.AddField(field);
            }
            if (field.FieldType == HqlFieldType.FUNCTION)
            {
                LoadField(field.Func.Field);
            }
            else if (field.FieldType == HqlFieldType.SCALAR)
            {
                HqlScalar scalar = field.Scalar;
                if (scalar.HasMultipleFields)
                {
                    for (int i = 0; i < scalar.Fields.Length; ++i)
                    {
                        LoadField(scalar.Fields[i]);
                    }
                }
                else
                {
                    LoadField(scalar.Field);
                }
            }
        }