protected override Expression VisitEnumDefinition(SqlEnumDefinitionExpression expression) { SqlEnumDefinitionExpression current; if (!TryGetCurrent(expression, out current)) { return expression; } if (!(this.result &= current.NodeType == expression.NodeType)) { return expression; } if (!(this.result &= current.Type == expression.Type)) { return expression; } this.currentObject = current.Labels; this.VisitObjectList(expression.Labels); if (!this.result) { return expression; } this.currentObject = current; return expression; }
protected override Expression VisitEnumDefinition(SqlEnumDefinitionExpression expression) { this.Write("ENUM ("); this.WriteDeliminatedListOfItems(expression.Labels, this.WriteQuotedString); this.Write(")"); return expression; }
private Expression BuildCreateEnumTypeExpression(EnumTypeDescriptor enumTypeDescriptor) { var sqlTypeExpression = new SqlTypeExpression(enumTypeDescriptor.Name); var asExpression = new SqlEnumDefinitionExpression(enumTypeDescriptor.GetValues()); return new SqlCreateTypeExpression(sqlTypeExpression, asExpression, true); }
protected virtual Expression VisitEnumDefinition(SqlEnumDefinitionExpression expression) { return expression; }
protected virtual Expression VisitEnumDefinition(SqlEnumDefinitionExpression expression) { return(expression); }