public override TypedValue DefaultValue() { if (_default == null) { _default = UserValue.Create(MakeDefaultValues(Heading), this); } return(_default); }
static public UserValue Create(TypedValue[] value, DataTypeUser datatype) { if (datatype.Name == "date") { return(Builtin.DateValue.Create(value[0] as TimeValue)); } var ret = new UserValue { Value = value, _datatype = datatype }; ret._hashcode = ret.CalcHashCode(); return(ret); }
public void SetStructEnd() { var tuple = FilledValues(); _valueholder = _valueholder._parent; var datatype = _valueholder.DataType; if (datatype is DataTypeUser) { _valueholder._values[_valueholder._colidx] = UserValue.Create(tuple, datatype as DataTypeUser); } else if (datatype is DataTypeTuple) { var row = DataRow.Create(datatype.Heading, tuple); _valueholder._values[_valueholder._colidx] = TupleValue.Create(row); } else { Logger.Assert(_valueholder.DataType is DataTypeRelation); _valueholder._list.Add(tuple); } }
// Create a value for this type public UserValue CreateValue(TypedValue[] values) { return(UserValue.Create(values, this)); }
static UserValue() { Default = Create(new TypedValue[0], DataTypeUser.Empty); }