userTypeAttribute returns the attribute of the given user type.
(ut expr.UserType)
| 909 | |
| 910 | // userTypeAttribute returns the attribute of the given user type. |
| 911 | func userTypeAttribute(ut expr.UserType) *expr.AttributeExpr { |
| 912 | att := ut.Attribute() |
| 913 | if rt, ok := ut.(*expr.ResultTypeExpr); ok { |
| 914 | if a := unwrapAttr(expr.DupAtt(rt.Attribute())); expr.IsArray(a.Type) { |
| 915 | // result type collection |
| 916 | att = &expr.AttributeExpr{Type: expr.AsObject(rt)} |
| 917 | } |
| 918 | } |
| 919 | return att |
| 920 | } |
| 921 | |
| 922 | // buildRequestConvertData builds the convert data for the server and client |
| 923 | // requests. |
no test coverage detected