public HqlField(HqlFieldType type, HqlScalar scalar) // for SCALAR { if (type != HqlFieldType.SCALAR) { throw new Exception("Instance is for SCALAR only"); } Init(type); _scalar = scalar; }
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); }
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); } }
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); } } }